From: lio-sand <lio...@if...> - 2004-08-06 10:49:10
|
Hi Michelle, I'm running jEdit 4.2pre15 with the Sun sdk 1.5.0-beta2 and I've no probl= ems for openning files in both 'Cp850' and 'ibm850', althought only the later= is listed in the buffer option dialog character encoding pull-down list. Furthermore you can type directly any encoding you wish in this field. Yo= u will get an unknown encoding exception then if your java VM doesn't suppo= rts it. If I remember correctly I was able to do the same with jEdit 4.1, but I can't be too sure. FSB is for File System Brower whitch is available in Utilities -> File System Brower. Hope this helps, Lionel. ----- Original Message ----- From: <m....@fr...> To: <jed...@li...>; <lio...@if...> Sent: Friday, August 06, 2004 9:39 AM Subject: Re[2]: [ jEdit-users ] OEM Encoding ? > Thanks for answering Lionel. > > Thursday, August 5, 2004, 11:50:50 PM, you wrote: > > ls> Hi, > > ls> As far as I know you need running jEdit with the SDK (and not only = the JRE) > ls> to be able to use ibm850 encoding. > ls> jEdit doesn't automatically detect ibm850 encoding, but while openi= ng a file > ls> you can specify any encoding you want your file opened with (see encoding > ls> submenu in FSB context menu). If your file is already opened you ca= n change > ls> encoding in the buffer option panel and then reload it. But if most= of the > ls> files you edit with jEdit are OEM you should consider setting your default > ls> encoding to ibm850. > > I'm afraid my question was not clearly put. > It was about availability of the encoding definition in JEdit, > not autodetection. > I'm not sure what you call "FSB context menu", but I found > how to select active encoding in the Buffer Options Dialog. > In the encodings list displayed, nothing looks like ibm850 > or Cp850 (the java standard name for charset), available in java. > > I use a shortcut with: > e:\prog\j2sdk1.4.1_02\bin\javaw -jar jedit.jar. > for launching Jedit. > > I tried this java code which works fine with srcencoding =3D "ibm850" : > > import java.io.*; > ... > public void ConvertFileToUnicode(String srcname, String outname, String srcencoding) throws IOException { > FileInputStream fs =3D new FileInputStream(srcname); > FileOutputStream os =3D new FileOutputStream(outname); > InputStreamReader in =3D new InputStreamReader(fs, srcencoding)= ; > OutputStreamWriter out =3D new OutputStreamWriter(os, "utf-16")= ; > System.out.println("Source encoding: " + in.getEncoding()); > int c; > while ( (c=3D in.read())!=3D-1) { > out.write(c); > } > out.close(); > } > ... > > > -- > Best regards, > Michelle > > > > ------------------------------------------------------- > This SF.Net email is sponsored by OSTG. Have you noticed the changes on > Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, > one more big change to announce. We are now OSTG- Open Source Technolog= y > Group. Come see the changes on the new OSTG site. www.ostg.com > -- > ----------------------------------------------- > jEdit Users' List > jEd...@li... > https://lists.sourceforge.net/lists/listinfo/jedit-users > > _____________________________________________________________________ > Envie de discuter en "live" avec vos amis ? T=E9l=E9charger MSN Messeng= er > http://www.ifrance.com/_reloc/m la 1=E8re messagerie instantan=E9e de F= rance --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.734 / Virus Database: 488 - Release Date: 04/08/2004 |