Sunday, 15 January 2012

stdin piping from python to java utf8 encoding error -


I am trying to pipe some unicode characters from Python to Java.

Python Code:

Thai = U "command =" Java - Junk TokenIsser. "+ Thai P = Sbprosek. Popen (command, Stdaut = Sbproses Kpeepii, Stdin = Sbproses Kpeepii, Stderr = subprocess.PIPE)

I have them in Java args [] of the pipe to the scheme.

  [public static void main (string] Arges) {string Thai = "ฉัน จะ"  

results Toknijhr were different when I went in Java: กลับ บ้าน ใน คืน นี้ "ThaiAnalyzer ana = new Thaianlizhr (); Anakanalyze (Thai)}

vs.

  public static void main (String [] Arges) {string Thai; Thai = Arges [0] // "ฉัน จะ กลับ บ้าน ใน คืน นี้" (the string should be passed to Python) Thai Analizhr Ana = new Thaianlizhr (); Ana.analyze (forgive args [0])}  

I believe that it is an encoding problem

My little Java code because I have now Code is not

I'm trying to say for example if I pipe this string to pipe it from java to java

  "I'm home I am going " 

me

 " hi "," me "," am "," go "," home "  can end with 

If I had to use the pre-system

and the latter method might be something like

  "hi i", "am", "go home" / code> 

my question Due to the difference in output results, I am using English to clarify my problem.


No comments:

Post a Comment