I meet a same encoding problem using DOMDocument::load XML described at http://www.php.net/manual/en/domdocument.load.php.
In short, if the XML has encoding=”UTF-8″, it will be parsed properly. In my case, the XML has encoding=”windows-1252″, but it has been changed to “UTF-8”. For example, “Schütze” is changed to “SchÃ¼tze”. My guess is that DOMDocument::load only recognizes “UTF-8”, otherwise it changes other encoding to “UTF-8”.
My solution is “iconv(“UTF-8″,”windows-1252″,$str)” which changes it back to original encoding. This solution assumes you know the original encoding.
Let’s have a look first:
Java is top 1 again, which is my best language. Of cause, PHP is my another favorite one. Also I used Perl and Shell script frequently before.
Object-C and PowerShell are new ones need to be noticed.
It is not my first time to install Subversion, but it is worth to record what I did. My system is Ubuntu 9.0.4 and Eclipse 3.5 and Netbeans 6.5.
Following the official documentation, I got the error in Eclipse: “Incompatible JavaHL library loaded. 1.6.x or later required.”
The reason is clear: JavaHL is not properly install or might version is too old.
Try: “sudo apt-get install libsvn-java”, but no update.
I had to compile from source code now according to . The tricky part is to let Eclipse know where is JavaHL. I tried add “-Djava.library.path=/usr/local/lib” to “eclipse.ini”, but did not work. Only “export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH” works for me.
Since Eclipse works now, it is time to try Netbeans according to . Just figure out where is SVN using “which svn” and then following the instrunction.
There are two ways to do this:
- Call Runtime.getRuntime().exec();
- Use Java Native Interface (JNI)