Re: [Ikvm-developers] character encodings
Brought to you by:
jfrijters
From: Quentin A. <que...@ad...> - 2005-03-24 17:38:01
|
Hi, here are the alias name for Windows1252 on classpath : Windows1252 ibm-5348_P100-1997 ibm-5348 windows-1252 Windows-1252 cp1252 CP1252 cp-1252 CP-1252 windows1252 You can find the alias name in the file SystemProperties.java in=20 classpath/gnu/classpath. Regards, Quentin Le Jeudi 24 Mars 2005 17:01, Matt Munz a =E9crit=A0: > Jeroen, > > Thanks. I just tried Windows1252, and it is a valid value for > "file.encoder", but it doesn't seem to fix the bug, and UTF8 does, so > I'm not going to sweat it for now. The moral of the story is that my > socket-based application shouldn't rely on the JVM default encodings (on > different machines!) in the first place :) I'm just glad that this was > fixed with just one change to a system property. Thanks again. > > - Matt > > -----Original Message----- > From: Jeroen Frijters [mailto:je...@su...] > Sent: Thursday, March 24, 2005 10:53 AM > To: Matt Munz; ikv...@li... > Subject: RE: [Ikvm-developers] character encodings > > Hi Matt, > > The Classpath docs are a bit outdated (aren't they always ;-)) wrt > available encodings. Looking at the sources, I can see that there are a > bunch more: > Decoder8859_1.java > Decoder8859_13.java > Decoder8859_15.java > Decoder8859_2.java > Decoder8859_3.java > Decoder8859_4.java > Decoder8859_5.java > Decoder8859_6.java > Decoder8859_7.java > Decoder8859_8.java > Decoder8859_9.java > DecoderASCII.java > DecoderCp1047.java > DecoderEBCDIC_XML_US.java > DecoderUTF16BE.java > DecoderUTF16LE.java > DecoderUTF32BE.java > DecoderUTF32LE.java > DecoderUTF8.java > DecoderWindows1250.java > DecoderWindows1252.java > > So while the Cp1252 alias isn't available, the encoding does appear to > be available (as "Windows1252"). > > Regards, > Jeroen > > > -----Original Message----- > > From: ikv...@li... > > [mailto:ikv...@li...] On > > Behalf Of Matt Munz > > Sent: Thursday, March 24, 2005 16:43 > > To: ikv...@li... > > Subject: RE: [Ikvm-developers] character encodings > > > > > > Jeroen, > > > > Thanks for yet again providing impeccable advice. When I tried > > this,[0] I got an error at startup.[1] It appears that Classpath does > > not support Cp1252, [2] so I just switched to UTF8 and now > > it all works > > fine. [3] > > > > [0] > > <appSettings> > > <add key=3D"ikvm:file.encoding" value=3D"Cp1252"/> > > </appSettings> > > [1] Cannot load system default encoding: Cp1252 > > [2] From the Classpath docs: > > Here is a list of standard encoding names that may be available: > > * 8859_1 (ISO-8859-1/Latin-1) > > * 8859_2 (ISO-8859-2/Latin-2) > > * 8859_3 (ISO-8859-3/Latin-3) > > * 8859_4 (ISO-8859-4/Latin-4) > > * 8859_5 (ISO-8859-5/Latin-5) > > * 8859_6 (ISO-8859-6/Latin-6) > > * 8859_7 (ISO-8859-7/Latin-7) > > * 8859_8 (ISO-8859-8/Latin-8) > > * 8859_9 (ISO-8859-9/Latin-9) > > * ASCII (7-bit ASCII) > > * UTF8 (UCS Transformation Format-8) > > [3] > > <appSettings> > > <add key=3D"ikvm:file.encoding" value=3D"UTF8"/> > > </appSettings> > > > > - Matt > > > > -----Original Message----- > > From: Jeroen Frijters [mailto:je...@su...] > > Sent: Thursday, March 24, 2005 3:49 AM > > To: Matt Munz; ikv...@li... > > Subject: RE: [Ikvm-developers] character encodings > > > > Hi, > > > > The default encoding for IKVM is currently 8859_1, while Sun > > uses Cp1252 > > on my system, I assume this is based on the Windows codepage. > > > > Try setting the file.encoding system property to the right encoding > > (assuming that Classpath supports it). Note that you'd need to do this > > in your app.config to make sure it gets set before the character > > encoding/decoding infrastructure initializes. > > > > Regards, > > Jeroen > > > > > -----Original Message----- > > > From: ikv...@li... > > > [mailto:ikv...@li...] On > > > Behalf Of Matt Munz > > > Sent: Wednesday, March 23, 2005 23:46 > > > To: ikv...@li... > > > Subject: [Ikvm-developers] character encodings > > > > > > Hi all, > > > > > > I have a java app that reads/writes from/to a socket > > > connection. When I run it on the Sun jvm, my characters are > > > all preserved, but when I run the IKVMC'd version in MSFT's > > > .Net VM, the special characters read from the socket are mangled. > > > > > > The data from the socket is being marshalled to Strings, > > > using the default encoding. I haven't tested this deeply > > > yet, so this may be a Classpath issue. Does IKVMC influence > > > the way Strings are encoded? > > > > > > Any suggestions? > > > > > > - Matt Munz > > > mm...@ap... > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by Microsoft Mobile & Embedded > > > DevCon 2005 > > > Attend MEDC 2005 May 9-12 in Vegas. Learn more about the > > > latest Windows > > > Embedded(r) & Windows Mobile(tm) platforms, applications & > > > content. Register > > > by 3/29 & save $300 > > > > http://ads.osdn.com/?ad_idh83&alloc_id=15149&op=3Dick > > > > > _______________________________________________ > > > Ikvm-developers mailing list > > > Ikv...@li... > > > https://lists.sourceforge.net/lists/listinfo/ikvm-developers > > > > ------------------------------------------------------- > > This SF.net email is sponsored by Microsoft Mobile & Embedded > > DevCon 2005 > > Attend MEDC 2005 May 9-12 in Vegas. Learn more about the > > latest Windows > > Embedded(r) & Windows Mobile(tm) platforms, applications & > > content. Register > > by 3/29 & save $300 http://ads.osdn.com/?ad_idh83&alloc_id=15149&op=3Di= ck > > _______________________________________________ > > Ikvm-developers mailing list > > Ikv...@li... > > https://lists.sourceforge.net/lists/listinfo/ikvm-developers > > ------------------------------------------------------- > This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005 > Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows > Embedded(r) & Windows Mobile(tm) platforms, applications & content.=20 > Register by 3/29 & save $300 > http://ads.osdn.com/?ad_idh83&alloc_id=15149&op=3DClick > _______________________________________________ > Ikvm-developers mailing list > Ikv...@li... > https://lists.sourceforge.net/lists/listinfo/ikvm-developers |