Portuguese accents not working on PHPStorm - phpstorm

Recently on a fresh Ubuntu installation, suddenly PHPStorm stopped allowing me to use words with portuguese accents.
For example:
Trying TILDE+A should result in: ã
Instead it results in: a
And this happens with other accents like:
Trying DIACRITICAL SIGN+E should result in: é
Instead it results in: e
Currently the laptop configuration is as follows:
OS: Ubuntu 15.04
Java: OpenJDK 8 (OpenJDK 7 did not worked also)
PHPStorm 8.0.3
Keyboard: Portuguese
Note 1: I think the problem may be related with key bindings once that the standalone key c-cedilla works just fine.
Note 2: My mother language isn't English so errors may occur, feel free to correct me. I appreciate it.
Any further help would be appreciated, thanks a lot!

Well, so after some days struggling against this problem I finally found out what I already expected since the beginning, this is a problem related to java itself.
In order for special characters to work we've to clean up the XMODIFIERS environment variable, like so:
# Command to change the environment variable XMODIFIERS
export XMODIFIERS=""
# PhpStorm run, for testing if it worked
pstorm
And for me it did work!
So, after testing I just added the export command to my ~/.bashrc file so this change takes effect every time and not only that one when we've changed it manually in a terminal window. In the end of your .bashrc file paste the following (same command as above):
export XMODIFIERS=""
I got the tip from here: https://askubuntu.com/a/581769/410364

For some reason, add the export XMODIFIERS="" on rc file didn't work (put it on .bashrc and in the .zshrc). Even put in .profile file doesn't work. So, I create a shell file with:
export XMODIFIERS=""
/opt/PhpStorm-191.6183.95/bin/phpstorm.sh
and put that shell file in the PHPStorm .desktop file as a program filepath. It's work to me :)

To me works with this:
export IBUS_ENABLE_SYNC_MODE=1
ibus-daemon -d -r

Related

I have installed MySQL and have added the directory to my PATH but it still isnt working [duplicate]

This question already has an answer here:
VS code terminal can't find AWS SAM even though windows terminal can
(1 answer)
Closed yesterday.
So I downloaded the MySQL installer from https://dev.mysql.com/downloads/installer/. I then went through the process of setting it up via the installer etc. After this was complete, I went to test the command in both Windows PowerShell and CMD, but neither worked.
I looked everywhere I could online to find out what the issue was, but nothing really worked. I found a post that said to add the MySQL path to the main system PATH and so I did. The command I used was:
SET PATH=%PATH%;C:\Program Files\MySQL\MySQL Server 8.0\bin
I also manually edited my environment variables and checked everything there. HOWEVER, a really weird thing is that when I run that command in cmd the mysql --version command WORKS! When I run the same command in Powershell it doesn't, and when I close Windows Terminal and re-open it, the command no longer works in cmd! I really have no idea whats going on. The error message I receive in PowerShell is:
PS C:\Users\User> mysql --version
mysql: The term 'mysql' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
And the error message I receive in CMD is:
C:\Users\User>mysql --version
'mysql' is not recognized as an internal or external command,
operable program or batch file.
If anyone could give me a hand, that'd be amazing, thanks.
Adding to the PATH the way you did is only temporary. It lasts as long as the terminal is open, and when the terminal is gone, so is the change to the path. Use setx instead of set to make it permanent, or make the change using the UI in Windows settings. To do the latter, open the Settings dialog and type Environment into the search box, and then choose the option to change the system environmental variables. When the System Properties dialog appears, click the Environmental variables button at the lower right.

zsh auto-completion shows too many and it's annoying

I use WSL2 (Ubuntu 20.04) and installed zsh and ohmyzsh.
The problem is when I use press <tab>, it lists too many commands and files. For example,
en<tab>
and it lists like this.
EnterpriseAPNCsp.dll en-US energytask.dll
EnterpriseAppMgmtClient.dll enable enrollmentapi.dll
EnterpriseAppMgmtSvc.dll enc2xs enterprisecsps.dll
EnterpriseAppVMgmtCSP.dll encapi.dll enterpriseetw.dll
EnterpriseDesktopAppMgmtCSP.dll encguess enterpriseresourcemanager.dll
EnterpriseModernAppMgmtCSP.dll end env
en energy.dll env_default
en-GB energyprov.dll envsubst
However, only the file env is on the current directory.
Can you help me to solve this problem?
Add to your .zshrc file:
setopt hashexecutablesonly
This ensures that zsh, when searching your $path for commands, will exclude files that are not actually executables.

Sublime Text 2 and bin paths

If I print my $PATH in a terminal (zsh) I get:
λ echo $PATH
/Users/jviotti/.nvm/v0.11.13/bin:/Users/jviotti/bin/Sencha/Cmd/4.0.2.67:/usr/sbin:/usr/local/bin:/usr/local/sbin:/sbin:/opt/bin:/Users/jviotti/bin:/home/jviotti/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/git/bin
However if I print the environment variables from Sublime Text 2 console I only get:
>>> print(os.environ['PATH'])
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/jviotti/bin
Sublime Text 2 detects that I'm using Zsh, however most of my paths are missing.
How can I fix this?
When you launch Sublime via the command line with the subl command, it picks up your current PATH from your shell. However, files launched from the GUI have a separate PATH, and this is what needs to be changed. Please check out my answer over at Unix.SE for detailed instructions on how to set the PATH for OS X programs launched via the Dock or Finder. This has only been tested on Mountain Lion (there is a different method for Lion), and while it should work on Mavericks I can't guarantee it. It does require having admin privileges.
Briefly, you need to edit /etc/launchd.conf (or create it if it doesn't exist) to include all the entries you want, then restart your computer for the changes to take effect. Keep in mind that this will affect all GUI programs, not just Sublime, so if you start getting unexplained behavior or errors, this may be the reason.
Good luck!

Mysql command line restore error "The system cannot find the file specified."

Ive got a rather strange issue, ive got an automated build tool that is calling through to the mysql command line to teardown then setup a database from an SQL file.
On one computer it is working fine, and its basically calling:
Mysql -h {Connection::Host} -u {Connection::User} --password={Connection::Password} < {sqlFile}
Ive just checked it out on another computer and tried to build and it keeps giving me the error "The system cannot find the file specified.". The MySQL versions are the same 5.1 and no other files have changed. The only thing that i know is different is where the build files are deployed... at home they are deployed to:
d:/code/projects/xxxxx/
whereas on this computer that doesn't work it is deployed to:
c:\Documents and Settings\xxxxxx\My Documents\Projects\Other\xxxxxx\
The interwebs brought back a few possibilities such as the spaces within the path, however ive tried adding the -i to the command (ignore spaces) and it made no difference.
Anyone have any ideas?
It's most likely the spaces in the path. The part after the space will be passed to the program as a different parameter.
Try surrounding {sqlFile} with double quotes.
Mysql .... < "{sqlFile}"

How to install MySQL on Leopard, Mac OS X 10.5?

I followed this tutorial to the very end, then found out it didn't work right. I think I have everything installed but when I type
mysql -uroot
I only get
-bash: mysql: command not found
Note: I did not skip the "Setting the Path" step. Upon running this command for the first time:
mate ~/.bash_login
This brought up an empty file. So I added this line:
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
I saved the file, closed TextMate, executed the following command:
. ~/.bash_login
...and continued with the tutorial. Based on your suggestions, I thought maybe the file didn't actually get saved. So I ran the following command to bring up the file again:
mate ~/.bash_login
...yet the contents of the file were as they should be.
Any suggestions?
You probably don't have the mysql binaries in your path.
The link you posted has a section on setting the path, titled "Setting the Path Do not skip this step! Most everything else will fail if you do."
EDIT: As debugging steps, try:
First launching a new terminal window. Does it run now?
Typing "echo $PATH" at the prompt. Does the path show up correctly as you've typed it in bash_profile?
Running it the long way: /usr/local/mysql/bin/mysql -u root
Does the application run?
Did you follow the step that says
Setting the Path
Do not skip this step! Most everything
else will fail if you do.
Did you close your terminal window and re-open it afterwards?
Update:
What does "which mysql" say? Does "ls /usr/local/mysql/bin" say?
Two things:
Try editing ~/.profile (rather than ~/.bash_profile or ~/.bash_login).
You may find it easier to use the native Mac style .dmg installer directly from Sun.
One nice thing about the dmg installer is that it automagically sets up symlinks to /usr/local/mysql (which means less - or no - fiddling with your $PATH).
Another option would be to use MAMP.
It has Apache, PHP and MySQL packaged with no further setup necessary.
MySQL is usually put in /usr/local/mysql/bin/
You need to add this to your PATH, you can do this by adding the follwoing lines to your .bash_profile
PATH=$PATH:/usr/local/mysql/bin/
export PATH
The .bash_profile file is located in the root of your username directory.
Make sure you restart your Terminal for the setting to take affect.
And if you're not a command-line person, I highly recommend you also install the MySQL Preference Pane to start/stop the server and install Sequel Pro to create databases and run queries.
ftp://ftp.mysql.com/pub/mysql/download/gui-tools/MySQL.prefPane-leopardfix.zip
http://www.sequelpro.com/