Non-Latin-1 characters in properties files?

We are having substantial difficulties translating a properties file into Turkish (which uses 6 characters outside the Latin 1 code page). The only way we've found to encode them that seems to work is to encode them with backslash escapes. Is there a better way?

No, what you did is what you have to do. From the API documentation for Properties:
"When saving properties to a stream or loading them from a stream, the ISO 8859-1 character encoding is used. For characters that cannot be directly represented in this encoding, Unicode escapes are used; however, only a single 'u' character is allowed in an escape sequence. The native2ascii tool can be used to convert property files to and from other character encodings."

Similar Messages

  • How to display feeds with non-latin utf8 characters in Raggle?

    Has anyone tried to use raggle to read feeds with non-latin utf8 characters?
    If you are successful, how to do it?
    Thanks

    i have this problem too...
    Last edited by vdo (2008-09-02 12:19:31)

  • Non US-ASCII characters in download file names

    I am trying to implement a simple file download in a JSP, and trying to get IE, Firefox and Opera to all display and handle non US-ASCII characters in the suggested download file name. Only concerned with Windows platform for now. Here's the code I am currently using:
    String agent = request.getHeader("USER-AGENT");
    if (null != agent && -1 != agent.indexOf("MSIE"))
    String codedfilename = URLEncoder.encode(cfrfilename, "UTF8");
    response.setContentType("application/x-download");
    response.setHeader("Content-Disposition","attachment;filename=" + codedfilename);
    else if (null != agent && -1 != agent.indexOf("Mozilla"))
    String codedfilename = MimeUtility.encodeText(cfrfilename, "UTF8", "B");
    response.setContentType("application/x-download");
    response.setHeader("Content-Disposition","attachment;filename=" + codedfilename);
    else
    response.setContentType("application/x-download");
    response.setHeader("Content-Disposition","attachment;filename=" + cfrfilename);
    }This URL encodes the file name if the browser is IE, MIME encodes it if the browser is Mozilla, and sends plain UTF-8 (the encoding of the JSP) for all other browsers. I get "cfrfilename" from translated properties files, and the string can contain characters from any character set - Chinese, Thai, Korean, etc.
    This code works correctly for IE - the file name is displayed correctly in the file Save as dialog, and it is saved correctly on disk, no matter which character set is used.
    For Firefox, the file name is displayed correctly in the file Save as dialog, but it is only saved correctly to disk if the file name is in a character set supported by the system locale. This seems to be a known Firefox bug (not fully using the Windows Unicode APIs), so nothing I can do about that.
    Nothing seems to work for Opera, however - I cannot get the file name to display correctly in the file Save as dialog, no matter which method I use (I have tried URL encoding and MIME encoding in addition to the plain UTF-8).
    Has anybody implemented something similar that works for at least these 3 browsers?

    I tested your code today,
                         dialog           save           open
    Firefox 1.5          OK                 OK               OK
    IE 6.0                OK                 OK                NGdailog: filename show in download popup dialog
    save: save to disk from dialog
    open: open directly from dailog

  • How to send non-latin unicode characters from Flex application to a web service?

    Hi,
    I am creating an XML containing data entered by user into a TextInput. The XML is sent then to HTTPService.
    I've tried this
    var xml : XML = <title>{_title}</title>;
    and this
    var xml : XML = new XML("<title>" + _title + "</title>");
    _title variable is filled with string taken from TextInput.
    When user enters non-latin characters (e.g. russian) the web service responds that XML contains characters that are not UTF-8.
    I run a sniffer and found that non-printable characters are sent to the web service like
    <title>����</title>
    How can I encode non-latin characters to UTF-8?
    I have an idea to use ByteArray and pair of functions readMultiByte / writeMultiByte (to write in current character set and read UTF-8) but I need to determine the current character set Flex (or TextInput) is using.
    Can anyone help convert the characters?
    Thanks in advance,
    best regards,
    Sergey.

    Found tha answer myself: set System.useCodePage to false

  • Reading Japanese Characters from Properties File

    I am running on Windows 2000 (English). Can any one suggest on how to read Japanese Characters from a ".properties" file.
    TIA

    look at ResourceBundle and unicode encoding,
    Jim

  • Again about non Latin 1 characters for XE beta

    May be it is possible create beta XE universal language version? The statistic of threads shows actuality of this function for testing/education/development needs. It's not possible study/develop with XE without inserting necessary real data. It's too long time waiting for release.

    It's under consideration.

  • Cannot create file with Non-latin characters- I/O

    I'm trying to create a file w/ Greek (or any other non-latin) characters ... for use in a RegEx demo.
    I can't seem to create the characters. I'm thinking I'm doing something wrong w/ IO.
    The code follows. Any insight would be appreciated. - Thanks
    import java.util.regex.*;
    import java.io.*;
    public class GreekChars{
         public static void main(String [ ] args ) throws Exception{
              int c;
              createInputFile();
    //          String input = new BufferedReader(new FileReader("GreekChars.txt")).readLine();
    //          System.out.println(input);
              FileReader fr = new FileReader("GreekChars.txt");
              while( (c = fr.read()) != -1)
                   System.out.println( (char)c  );
         public static void createInputFile() throws Exception {
              PrintStream ps = new PrintStream(new FileOutputStream("GreekChars.txt"));
              ps.println("\u03A9\u0398\u03A0\u03A3"); // omega,theta,pi,sigma
              System.out.println("\u03A9\u0398\u03A0\u03A3"); // omega,theta,pi,sigma
              ps.flush();
              ps.close();
              FileWriter fw = new FileWriter("GreekChars.txt");
              fw.write("\u03A9\u0398\u03A0\u03A3",0,4);
              fw.flush();
              fw.close();
    // using a printstream to create file ... and BufferedReader to read
    C:> java GreekChars
    // using a Filewriter to create files  .. and FileReader to read
    C:> java GreekChars
    */

    Construct your file writer using a unicode format. If
    you don't then the file is written using the platform
    "default" format -probably ascii.
    example:
    FileWriter fw = new FileWriter("GreekChars.txt",
    "UTF-8");I don't know what version of FileWriter you are using, but not that I know of take two string parameters. You should try checking the API before trying to help someone, instead of just making things up.
    To the OP:
    The proper way to produce a file in UTF-8 format would be this:
    OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream("filename"), "UTF-8");Then to read the file, you would use:
    InputStreamReader reader = new InputStreamReader(new FileInputStream("filename"), "UTF-8");

  • Robohelp 9 .properties file inserting non-printable characters @ export

    I have a mapped help file that I am generating for integration to an online application. When we export the .properties file from the Project Set-up pod, the mapped files appear to be fine, if viewed in Notepad (see below).
    However, when this is viewed in a different text editor, you can see that RoboHelp added additional non-printable characters to the .properties file (see below).
    We've tried generating this from different computers, exporting it to different locations, retyping the initial entry, and haven't found a solution to this issue.
    Does anyone know if there is a fix available? Are we doing something wrong?
    Thanks!!
    Kelly

    Ask your developers if they think these characters could be what are known as BOM (byte order marks).
    That is something can be seen in some files using the default encoding. There it can be changed by changing the encoding in the SSL dialog.
    Maybe that explains it and if that is the cause, I don't know how you would prevent it here in Rh. I think you will have to live with your own solution.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Writing non-latin Character to Log file from Java application

    Hi Everyone,
    I'm encountering a very strange localization issue.
    I'm executing the following code from a J2EE application (although the behavior is replicated exactly from a Java console application):
    File testFile = new File("D:\\Temp\\blah.txt");
    testFile.createNewFile();
    Writer output = null;
    try {
    output = new BufferedWriter( new FileWriter(testFile) );
    output.write( "אחד שתיים שלוש" ); // Non-Latin characters
    output.write("one two three");
    finally {
    if (output != null) output.close();
    I'm writing non-latin characters (Hebrew in my case) to the file, but these characters are written as question marks:
    ??? ????? ????one two three
    I'm running the project with the following java arguments:
    -Dfile.encoding=UTF8 -Duser.region=IL -Duser.language=he
    And the Project Properties -> Compiler -> Character Encoding = UTF8
    Also, the local Windows Regional Settings are set to Israel / Hebrew.
    Can someone please help with this issue?
    I've tried this with UTF-8 (instead of UTF8) and still no results.
    I suspect this is a Java / Environment issue as it reproduces on a J2EE app and on a console app.
    Any help will be greatly appreciated.
    Thanks,
    Tal.

    You should open/close it somehow at every write from different processes.
    But I personally prefer different file names to your forced merging, though.

  • Non latin characters in .cfm filename

    Hi - I have users who want to name files with non latin characters.  i.e.
    Логотип_БелРусь_2500x1.cfm
    We get a file not found error, it is not an IIS issue and we have UTF-8 encoding and are running CF8.
    Yes we can rename the files but for now would like to know if non latin characters are allowed in .cfm file names.
    Thank you!
    Sapna

    PaulH wrote:
    en_US is the JRE locale. is that the same as the OS? and what file encoding?
    (check via cfadmin).
    i ask, because pretty sure you can't use non-ascii file names w/cf. there's an
    open bug on that:
    http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=77177
    only can guess that file encoding isn't latin-1, etc. and/or OS locale equals
    the same language as the file name.
    cfadmin gives pretty much the same information. Here's a direct copy
    Server Product
    ColdFusion
    Version
    9,0,0,241018  
    Edition
    Developer  
    Serial Number
    Operating System
    Windows 2000  
    OS Version
    5.0  
    Update Level
    /C:/ColdFusion9/lib/updates/hf900-78588.jar  
    Adobe Driver Version
    4.0 (Build 0005)  
    JVM Details
    Java Version
    1.6.0_12  
    Java Vendor
    Sun Microsystems Inc.  
    Java Vendor URL
    http://java.sun.com/
    Java Home
    C:\ColdFusion9\runtime\jre  
    Java File Encoding
    Cp1252  
    Java Default Locale
    en_US  
    File Separator
    Path Separator
    Line Separator
    Chr(13)

  • We cannot type Polish (non-latin) characters in WebDynpro applications

    We cannot type Polish (non-latin) characters in WebDynpro application (in runtime) because 'Browser Help Shortcuts' are fired.
    To type a polish character in polish keyboard you need to press AltGr + letter (ie. AltGr + a/c/e/s/o/l/z/x/n). To type an uppercase polish character you need to press AltGr + Shift + letter. This comination is in fact the same as pressing Alt + Ctrl + Shift + letter (because AltGr produces Alt + Ctrl) and it fires some of 'Browser Help Shortcuts'. For example AltGr + Shift + O should produce a letter O with a dash on it's top but instead it fires 'Show nesting of HTML containers'.
    We tried to turn off sap-wd-lightspeed, but then other key combinations are reserved for u2018Browser Help Shortcutsu2019.
    We need to be able to use AltGr + Shift + a/c/e/s/o/l/z/x/n in runtime.
    Product: SAP NW 7.11 SP04
    WebDynpro for Java
    I hope there is a somewhere a hidden parameter that solves our problem Maybe we're in some kind of debug mode?
    Thanks for your help!!

    The funny thing is that bold font [when message unread in message list] shows OK, ie in greek, but when i click on unread message, it is assumed to have been read, so it changes over to medium [non bold] and the encoding changes as well into the one that is not greek and thus unreadable.  In ~/.sylpheed/sylpheedrc the fonts are:
    widget_font=
    message_font=-microsoft-sylfaenarm-medium-r-normal-*-*-160-*-*-p-*-iso8859-7
    normal_font=-monotype-arial-medium-r-normal-*-12-*-*-*-*-*-iso8859-7
    bold_font=-monotype-arial-bold-r-normal-*-12-*-*-*-*-*-iso8859-7
    small_font=-monotype-arial-medium-r-normal-*-12-*-*-*-*-*-iso8859-7
    In /etc/gtk, for gtk1.2 apps the file refering to greek encoding [el] seems to be fine [exactly the same as in slackware 9.1].

  • Non-Latin Characters lead to finder distress.

    One of the nicest features of Macintosh from the time I first played on an SE30 is the capacity to quickly type non-Latin characters. While to many this might not seem like a big deal, for me being able to write Tetris™ without a second thought is a great convenience.
    So I was very surprised when I began typing µ in the Finder under Snow Leopard and didn't end up on a file that started with µ but rather on m. As if that wasn't irritating enough µ is not treated as m so the file becomes completely unreachable by alphabetic selection. This is something I use almost constantly in Finder so having a file unreachable is even worse than merely having the character interpreted incorrectly.
    Just to be certain that this wasn't merely a flaw with that one character I examined other common characters.
    ƒ, é, π, ∑ all suffer from the same problem, misinterpreted when typed and interpreted correctly during the comparison.
    So the question is, “Is this an error in how I set up my machine, an error in the string comparison system, or an error in the Finder program?”

    Yes, I just double checked, and I was in error, accented Latins do work as expected. I am certain that the inclusion of such in the prior list was a user error.
    However the fact that the Greek key layout works begins to suggest the root of the problem.
    Interestingly enough this also applies to the Greek layouts internal option modified keys.
    I am strongly suspecting a bug here.

  • Non-latin utf-8 characters on ssh host displayed as "???" in terminal

    Both the client and the host use the same locale: en_US.UTF-8
    I can input non-latin just fine but the resulting string appears in the terminal as question marks (e.g. "touch 表示してくれ; ls" gives me "??????????????????"), however if I check the same string with my SFTP client (Filezilla), the strings appears as intended so the character encoding seems to be handled correctly.
    I'm using "gnome-terminal" on my client, in case that makes any difference (terminal parameters: on the client: TERM="xterm" and COLORTERM="gnome-terminal"; on the host: TERM="xterm").
    Also, am I correct in assuming that I don't need to have any fonts installed on the host, as that's irrelevant to ssh?
    UPDATE: I noticed a "cat" on a utf-8 text file on the ssh host shows the characters correctly, but looking at the same file through "nano" shows garbled characters. On my local machine (with practically identical Arch software versions) on the other hand, both "cat" and "nano" show files with these characters correctly.
    Last edited by Lazar (2010-09-19 15:13:59)

    Hi,
    Like BluShadow I'm curious to see a test case...
    Depending on the way it's been created, the encoding declared in the XML prolog doesn't necessarily reflects the actual encoding of the content.
    What's your database character set, and version?
    Please also post the error message you get (LPX-00200 probably?).

  • Non-latin text disappears from DRM-protected pdf file

    Hi,
    I'm facing with following issue - when I package pdf with non-latin data (for example, arabian characters), they are not shown in ADE.
    Adobe Content Server: 4.2
    Client: ADE 2.0, DL Reader 2.4.7 (Android), Bluefire Reader 1.5.7
    Screenshot of 3rd page of document in ADE
    Pdf file is here - http://engineering-scratch-copyright-com.s3.amazonaws.com/nonproduction/ACS/arabic.pdf

    marlisa324 wrote:
    Hello,
    Hope someone can clue me into what I am doing wrong.  I use Overdrive for EPUB files from the library but they also have PDF files I would like to read which are DRM protected.  On the website it says that I can use Adobe Digital Editions and transfer the file from the library website to my computer and then my computer to my phone.  I can't seem to get the file to transfer from my computer to the phone.  Does anyone know what I may be doing wrong?
    Thanks for any help.
    To Wildman,
    Here is a link to Overdrive where the OP is getting the files that are either epub or pdf format that comes with DRM protection.  I looked into using it at one time for lending books from my library and reading on my Nook e-reader, but never got around to setting it up completely.
    http://nebraska.lib.overdrive.com/E4B52B8C-D4C4-4F21-BE70-496DD9D689F6/10/502/en/default.htm

  • Non-Latin Characters

    I am getting an error that my file name has non-latin characters, the file is named 01h_backM.jpg I am using save for web.

    Are you saving to a folder with symbols in the name? Try saving to a different folder.
    Benjamin

Maybe you are looking for

  • I'm not able to create a security seal for Yahoo.

    When I go to Yahoo.com, in order to log on, I must enter my user name and password. In order to insure that I'm truly on the Yahoo site, I'm asked to install a security seal. In attempting to create the seal, I continue to receive an error message.

  • Adding leading zeros before data loaded into DSO

    Hi In below PROD_ID... In some ID leading zeros are missing before data loaded into BI from SRM into PROD_ID. Data type is character. If leading zeros are missing then data activation of DSO is failed due to missing zeros and have to manually add the

  • Pro C Demo files not available in Oracle 11g

    Hi I have recently installed Oracle 11g rel1 in windows XP from downloading from oracle site. But no Pro C precompiler demo file or pcmake.bat file is installed in with this installation. As result i am not able to produce executable from .pc file. C

  • PSE 10 suddenly incompatibility in Windows 7

    Yesterday I used PSE 10 in WIndows 7 home edition w/o any problems.  It had been transferred from an XP machine and running with XP service pack 2 compatibility, and I have been running it almost daily w/o any problems for about 3 months.  This morni

  • Accessing SMB/Windows Shares on OS X

    I have an invisible windows share called public$, which I allow anyone to (read-only) access on my network. But to be able to access it on a mac I had to give it a password. Are there anyways around this password problem? On windows machines I am abl