German umlaute in resource bundles

Hi,
I am localizing an app in german. On windows I can use wordpad or Netbeans to type german umlaute (����) directly into the resource bundles (I have a german keyboard). But I fear, if someone runs this app on e.g. Linux, this does not work. I remember opening such files with an editor on Linux and the umlaute turned into some other strange letters. I think the same happens on english windows installs?
How can I do this right, to be able to run this app on Linux later?
Ingo

Ok, I am answering my own question here, just in case anybody else has the same problem. The solution is: use the native2ascii tool to covert files written with notepad into unicode. Or, use Netbeans to edit the resource Bundles (property files), it saves them in unicode from the beginning.
Ingo

Similar Messages

  • Resource boundles and german umlaute

    Hello,
    I'm new to 18n, so i have an important question. I'm developing an internationalized web application (currently for German and English Language). How do i write Umlaute like �,�,�... into the the ResourceBundle files, so that they are displayed correctly on the html pages. The Charset of teh webpages is set to: charset=iso-8859-1.
    Do i have to write <code>&auml;</code> for �?
    Thanks for your help. Nice place.
    Have a nice day

    hello,
    there is no problem with the ressource files itself, so the application is already internationalized. But i don't think in an elegant way for the German locale. In the Res Files we write thinks like:
    SOMEKEYFORIT = Bitte tragen sie eine gueltige Zahl ein.
    The word "gueltige" is such a problem. Is it recommended to write the html code &uuml; instead of "ue" at this point. Or is there another convention for German Umlaute.
    So all in all it works, expect of Umlaute, that are currently not well localized.
    Thank You,
    Have a nice Day

  • Numbers don't show german umlaut but quick view does

    I do have a problem opening CSV files in Numbers.
    I have a shared folder with VirtualBox. The virtual HD is formatted in FAT32. With Windows I created a CSV file which contains german umlauts like ÄÖÜ.
    When I open the CSV with the "quick view" (press space when file is selected in finder, the CSV is displayed as a nice Table and all Umlauts are OK.
    When I double click the CSV file to open it in Numbers, the Umlauts are not displayed. Opening in Text Edit is the same result, no Umlauts.
    ö = ^
    ß = fl
    ü = ¸
    ä = ‰
    I think this is an encoding problem, but why is "quick view" displaying it correct. I'm confused.
    Thanks for any help.

    Hello
    I cannot find any encoding settings for opening files in Numbers 09.
    A simple and obvious solution would be to save CSV file in UTF-8 in FAT32 volume in VirtualBox if possible.
    One other method is to copy the CSV file to HFS+ volume and set its extended attributes to specify its text encoding. This method is only changing the metadata of the file and so is less intrusive than to convert the data itself to different text encoding. When text encoding extended attribute is properly set, Numbers 09 (and TextEdit.app set to use "Automatic" encoding option in opening files) will open it in the specified text encoding.
    The following AppleScript script might help to set the extended attributes (OSX 10.5 or later only). Recipe is as follows.
    A1) Open /Applications/Utilities/AppleScript Editor.app, copy the code of set_latin1_xattr.applescript listed below and save it as application (bundle) in the folder where target CSV files reside.
    A2) Double click the saved applet and it will set the com.apple.TextEncoding extended attribute of the *.csv and *.txt files in the same folder where the applet resides to Latin 1 when they are recognised as 'ISO-8859 text' by file(1) command.
    -- set_latin1_xattr.applescript
    _main()
    on _main()
        set p2m to (path to me)'s POSIX path
        if p2m ends with "/" then set p2m to p2m's text 1 thru -2
        set sh to "
    # set current directory to parent directory of script (or die)
    cd \"${0%/*}\" || exit 1
    # add com.apple.TextEnncoding xattr for Latin-1
    # for *.csv and *.txt files, of which file info contains 'ISO-8859 text', in current directory
    for f in *.{csv,txt}
    do
        if [[ $(file \"$f\") =~ 'ISO-8859 text' ]]
        then
            xattr -w com.apple.TextEncoding \"WINDOWS-1252;$((0x0500))\" \"$f\"
        fi
    done
        do shell script "/bin/bash -c " & sh's quoted form & " " & p2m's quoted form
    end _main
    Another method is to convert the text encoding itself as you have already done using TextEdit.app.
    The following AppleScript might help to convert text encoding from latin-1 to utf-8 in bulk. Recipe is basically the same as the above.
    B1) Open /Applications/Utilities/AppleScript Editor.app, copy the code of convert_latin1_to_utf8.applescript listed below and save it as application (bundle) in the folder where target CSV files reside.
    B2) Double click the saved applet and it will convert the text encoding of the *.csv and *.txt files in the same folder where the applet resides to UTF-8 when they are recognised as 'ISO-8859 text' by file(1) command. Also it sets the extended attribute for text encoding accordingly.
    -- convert_latin1_to_utf8.applescript
    _main()
    on _main()
        set p2m to (path to me)'s POSIX path
        if p2m ends with "/" then set p2m to p2m's text 1 thru -2
        set sh to "
    # set current directory to parent directory of script (or die)
    cd \"${0%/*}\" || exit 1
    # make temporary directory
    temp=$(mktemp -d /tmp/\"${0##*/}\".XXXXXX) || exit 1
    # convert text encoding from ISO-8859-1 to UTF-8
    # for *.csv and *.txt files, of which file info contains 'ISO-8859 text', in current directory
    for f in *.{csv,txt}
    do
        if [[ $(file \"$f\") =~ 'ISO-8859 text' ]]
        then
            iconv -f ISO-8859-1 -t UTF-8 \"$f\" > \"$temp/$f\" \\
            && xattr -w com.apple.TextEncoding \"UTF-8;$((0x08000100))\" \"$temp/$f\" \\
            && mv -f \"$temp/$f\" \"$f\"
        fi
    done
    # clean up temporary directory
    rm -rf \"$temp\"
        do shell script "/bin/bash -c " & sh's quoted form & " " & p2m's quoted form
    end _main
    Note that the extended attribute is not supported in FAT32 and so the above methods only work in HFS+ formatted volume.
    Scripts are briefly tested with Numbers 2.0.5 under OSX 10.5.8 and 10.6.5. Please make sure you have backup CSV files before applying the above scripts.
    Good luck,
    H

  • German Umlauts OK in Test Environment, Question Marks (??) in production

    Hi Sun Forums,
    I have a simple Java application that uses JFrame for a window, a JTextArea for console output. While running my application in test mode (that is, run locally within Eclipse development environment) the software properly handles all German Umlauts in the JTextArea (also using Log4J to write the same output to file-- that too is OK). In fact, the application is flawless from this perspective.
    However, when I deploy the application to multiple environments, the Umlauts are displayed as ??. Deployment is destined for Mac OS X (10.4/10.5) and Windows-based computers. (XP, Vista) with a requirement of Java 1.5 at the minimum.
    On the test computer (Mac OS X 10.5), the test environment is OK, but running the application as a runnable jar, german umlauts become question marks ??. I use Jar Bundler on Mac to produce an application object, and Launch4J to build a Windows executables.
    I am setting the default encoding to UTF-8 at the start of my app. Other international characters treated OK after deployment (e, a with accents). It seems to be localized to german umlaut type characters where the app fails.
    I have encoded my source files as UTF-8 in Eclipse. I am having a hard time understanding what the root cause is. I suspect it is the default encoding on the computer the software is running on. If this is true, then how do I force the application to honor german umlauts?
    Thanks very much,
    Ryan Allaby
    RA-CC.COM
    J2EE/Java Developer
    Edited by: RyanAllaby on Jul 10, 2009 2:50 PM

    So you start with a string called "input"; where did that come from? As far as we know, it could already have been corrupted. ByteBuffer inputBuffer = ByteBuffer.wrap( input.getBytes() ); Here you convert the string to to a byte array using the default encoding. You say you've set the default to UTF-8, but how do you know it worked on the customer's machine? When we advise you not to rely on the default encoding, we don't mean you should override that system property, we mean you should always specify the encoding in your code. There's a getBytes() method that lets you do that.
    CharBuffer data = utf8charset.decode( inputBuffer ); Now you decode the byte[] that you think is UTF-8, as UTF-8. If getBytes() did in fact encode the string as UTF-8, this is a wash; you just wasted a lot of time and ended up with the exact same string you started with. On the other hand, if getBytes() used something other than UTF-8, you've just created a load of garbage. ByteBuffer outputBuffer = iso88591charset.encode( data );Next you create yet another byte array, this time using the ISO-8859-1 encoding. If the string was valid to begin with, and the previous steps didn't corrupt it, there could be characters in it that can't be encoded in ISO-8859-1. Those characters will be lost.
    byte[] outputData = outputBuffer.array();
    return new String( outputData ); Finally, you decode the byte[] once more, this time using the default encoding. As with getBytes(), there's a String constructor that lets you specify the encoding, but it doesn't really matter. For the previous steps to have worked, the default had to be UTF-8. That means you have a byte[] that's encoded as ISO-8859-1 and you're decoding it as UTF-8. What's wrong with this picture?
    This whole sequence makes no sense anyway; at best, it's a huge waste of clock cycles. It looks like you're trying to change the encoding of the string, which is impossible. No matter what platform it runs on, Java always uses the same encoding for strings. That encoding is UTF-16, but you don't really need to know that. You should only have to deal with character encodings when your app communicates with something outside itself, like a network or a file system.
    What's the real problem you're trying to solve?

  • resource-bundle tag of portlet.xml

    Hi.
    I'd like to use resource bundle. Therefore I add following tags inside <portlet> tag of portlet.xml and create 'testprofile.properties' file.
    <resource-bundle>testprofile</resource-bundle>
    But when I start tomcat, the error occured like following.
    2004-08-05 12:01:45,437 ERROR [main]
    java.lang.NullPointerException
    at java.io.Reader.<init>(Reader.java:61)
    at java.io.InputStreamReader.<init>(InputStreamReader.java:80)
    at java.util.Properties.load(Properties.java:189)
    at java.util.PropertyResourceBundle.<init>(PropertyResourceBundle.java:96)
    at com.plumtree.portlet.util.PortletInfo.addPropertyBundles(PortletInfo.java:425)
    at com.plumtree.portlet.servlet.PortletServlet.digestPortletXml(PortletServlet.java:527)
    at com.plumtree.portlet.servlet.PortletServlet.initDigester(PortletServlet.java:651)
    at com.plumtree.portlet.servlet.PortletServlet.init(PortletServlet.java:60)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex ...
    So I modified portlet.xml like following and try to start tomcat again.
    <resource-bundle>testprofile.properties</resource-bundle>
    Tomcat can be started successfully.
    But when I display the portlet, error occured.
    java.util.MissingResourceException: Can't find resource for bundle com.plumtree.portlet.util.PortletResourceBundle, key LogLevel at java.util.ResourceBundle.getObject(ResourceBundle.java:314) at java.util.ResourceBundle.getString(ResourceBundle.java:274) at portlet.TWNewMailPortlet.init(TWNewMailPortlet.java:45) at com.plumtree.portlet.servlet.BaseServlet.init(BaseServlet.java:522) at com.plumtree.portlet.servlet.PortletServlet.service(PortletServlet.java:136)
    The properties file 'testprofile.properties' is not loaded successfully, maybe.
    Do you know how to specify or use ResouceBundle in using Plumtree JSR168?
    The tips of source code is following
    In Portlet class which extends GenericPortlet
    public void init(PortletConfig config) throws PortletException {  super.init(config);  PortletLogger.init("Test", getPortletContext());  ResourceBundle rb = getResourceBundle(Locale.getDefault());  for (Enumeration e = rb.getKeys(); e.hasMoreElements(); ) {   String str = (String)e.nextElement();   System.out.println(str);  } String level = rb.getString("LogLevel"); PortletLogger.setLevel(level); }

    Are you naming your resource bundles something like:
    1. messages_en.properties (for English)
    2. messages_de.properties (for German)
    and so on.
    Also, do you include these properties files in your final deployment package, because if they're not there then the messages won't be displayed.

  • German umlaute and file download

    hi to all!
    hope someone can help me.
    I have a directory, let's say test, with a WEB-INF directory in it. ordinarry web-app...
    within "test" there is a file called gl�hw�rmchen.pdf. I want to download this file. when i use a link
    Gl�hw�rmchen a 404 STATUS CODE is returned. Tomcat 4.1.18 doesn't find the resource but it is DEFINITELY in there.
    I know that this is no bug, i just don't understand somethig. How can i tell Tomcat 4.1.18 to return files with german umlaute???
    please help...
    ciaou,
    wendigo

    sorry that's not the solution of the problem. I have prooved that my file is in the correct directory. It's NOT a context path problem. Other files are downloaded.....
    test.txt
    gl�hw�rmchen.pdf
    gluehwuermchen.pdf
    The JSP Source Code.....
    <%@page contentType="text/html;charset=ISO-8859-1"%>
    <html>
    <head><title>JSP Page</title></head>
    <body>
    Textdatei
    Gluehwuermchen.pdf Datei</br>
    Gl�hw�rmchen.pdf Datei</br>
    </body>
    </html>
    when I click the first or second a link, the files are transmitted, but the third file NOT.... The filename is written correctly. The Apache Tomcat 4.1.18 just doesn't find the file. REMEMBER!!! The Webserver FINDS the two other files in THE SAME DIRECTORY BUT NOT THOSE containing german umlaute. WHY????
    hope you can help me...
    wendigo

  • ADF:  Translated XLIFF Resource Bundle not Selected at Runtime

    Issue: When I run my ADF app in a web browser where French is selected as the default language, the labels on the form are still populated with English text from the default resource bundle, even though an XLIFF resource bundle for French exists.
    Details: I have created a default XLIFF resource bundle containing the text for all labels on my form in English, called labels.xlf. I have also created two translated XLIFF bundles for French and German and named them labels_fr.xlf and labels_de.xlf, respectively.
    On my form, I have used value expressions to retrieve the text for each component's label, like label="#{res.language}. JDeveloper added '<c:set var="res" value="#{adfBundle['oracle.fosxliff.uitest.labels']}"/>' to the top of my page, so I could access the resource bundle text. Identifying the resource bundle in the faces-config.xml file does not work. However, I did define which locales are supported by my application in this config file.
    *NOTE:* When I access these sames resource bundles in a managed bean by utilizing the locale of the UIViewRoot, the correct XLIFF file is retrieved and the translated text is correctly assigned to my components on the form.
    Is there some other configuration that I am missing? I was expecting XLIFF files to work similarly to properties files, which do work correctly regardless of whether the text is accessed using value expressions or managed beans.

    Ok, I've found the answer.
    I've added translatable custom properties on the view implemention
    and access these in the code...

  • Displaying Chinese read from resource bundles

    I have trouble displaying Chinese characters in my application. The text strings in the application that is shown to the user are put into resource bundles (ResourceBundle). In the file text_zh_TW.properties, the chinese text strings are located. The file is stored in UTF-8 format.
    When I fetch a chinese string from this file and display it in the GUI, it is not dispalyed properly. It is displayed almost like this '����>'.
    When I "format" the file by using native2ascii, the chinese chars are replaced by unicode escape numbers in the file. Then it works. But I will rather not format the file, because it makes maintanence more difficult.
    I'm using JBuilder as development tool.
    Does anyone know how to do this?

    u are just trying to do nothing but the internalisation concept. usually wat we do is that for example if we want o display any french language or german language we just use go to the corresponding trnslating websites and fetch those french words or any other corresponding language and use to store those words .properties file and after that we will display those words for the selected language.
    now ur problem is that as we dont have chinese letters in our keyboards u just go to the sites which will translate those words u mention and u just take a print screen and convert those words by cutting using mspaint and save it as .jpg file format and display those wods correspondingly....

  • German Umlaute don't work after upgrading to Yosemite with Japanese Romaji Layout set on U.S.

    Hi everyone,
    previously i could just use [ALT] + [U] and then press [A] / [a] / [U] / [u] / [O] / [o] to generate the german umlaut version.
    After installing Yosemite this does not work anymore, which is kinda frustrating. Cause it forces me to add another keyboard layout and switch when i have to write a german umlaut.
    I was previously using 'Input Source' > 'Japanese' > Enabled Romaji (Romaji layout was set to U.S.) & Hiragana.
    For testing purpose i added the Standard U.S. Layout and writing the Umlaut with the keyboard shortcut still works there. So that's why i think this is a Romaji specific bug.
    Has anyone any idea what's wrong ? Did Apple change something ?
    Best Regards

    Before I stumbled upon this thread, there was no flag at all. I had the character viewer there because pre-Yosemite it was the only way to access emoji (and things like arrows and other special symbols) in many apps (and still is for my Adobe CS5 apps). Additionally, I would use the keyboard viewer from time to time as a way to learn which keys to use for other special symbols (bring up the keyboard viewer and press option or shift-option or other combinations and it would show you a preview of what each key would generate).
    While reading this thread, I added more input sources (US International and US Extended) and would see the flags. The flags replaced the previous character/keyboard viewer menu icon. I switched between each flag to test my issue under each, to no avail.  Then I tried adding the Spanish keyboard but still had the same issue.
    Now I've removed all the input sources except the primary US keyboard. There is no longer a flag in my menu, it's gone back to the character viewer icon.
    The issue is still there. When I type option-r, u, or g, in any app nothing happens at all.
    Unfortunately, neither auto-substitution nor press-and-hold work in Adobe CS5 apps, which is where I need to use these special characters the most.
    Thank you for reaching out

  • File not found, Missing resource bundle

    Hi
    I have a problem in accessing files (XML and Resource bundles) in Java projects. I used to access these files in WD Java. The same piece of code does not work here.
    e.g. When I create a new file object by providing the path name I get a file not found exception. The file exists in my package and I call it this way:
    File f = new File("file.txt"); then in an input stream but it doesnt work. However in a J2EE project the same code works.
    Similarly the resouce bundle never seems to work even if I give the fully classified class name for the property file. I can access property files in WD Java with ease. I understand that the root path changes and hence the problem. How should I solve it? Is there an elegant way which makes it work in all cases? Please throw some light on the root path for these projects. Thank you.
    regards
    LNV
    Edited by: vln on Jan 16, 2008 9:34 AM

    You should be using
    <b>this.getClass().getResourceAsStream(filePath)</b>
    which will return you an InputStream.
    Check the JDK documentation for the respective methods in java.lang.Class and java.lang.ClassLoader.
    HTH!
    \-- Vladimir

  • How to compare and edit Resource bundle file using java programe

    Hi All
    I have two resource bundle with key, value and some comments. I need to write a java code to compare both of the values of the keys and if the values are different then i want to replace the second value with the first value.
    Its a programe which will udpate the second file with the first file values.
    I tried using Properties class but it didnt worked because when i am saving the file using store method it removes all the comments and the order of text also got disturbed.
    How I need to do this any help appriciated.
    Please elt me know if someone needs more info.
    Thanks in advance.

    Let's assume the ini file is a mapping type storage (key=value) so lets use Properties object. (works with java 1.4 & up)
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.util.Properties;
    public class Test {
         private static Properties props;
         public static void main(String[] args) throws IOException {
              File file = new File("test.ini");//This is out ini file
              props = new Properties();//Create the properties object
              read(file);//Read the ini file
              //Once we've populated the Properties object. set/add a property using the setProperty() method.
              props.setProperty("testing", "value");
              write(file);//Write to ini file
         public static void read(File file) throws IOException {
              FileInputStream fis = new FileInputStream(file);//Create a FileInputStream
              props.load(fis);//load the ini to the Properties file
              fis.close();//close
         public static void write(File file) throws IOException {
              FileOutputStream fos = new FileOutputStream(file);//Create a FileOutputStream
              props.store(fos, "");//write the Properties object values to our ini file
              fos.close();//close
    }

  • Resource bundle in shared library?

    Is it possible to create a resource bundle in a shared library so you can use the same resource bundle in different application?
    We are creating different ADF application and each of them should use the same resource bundle.
    I tried creating a new project that only contains the resource bundle and then add this to my jspx page:
    <c:set var="res"
             value="#{adfBundle['general.resources.generalBundle]}"/>When i do this, he can't find any entries. When i change the project properties and configure to use a single bundle for the entire project, this works.
    How can i share a bundle so each application does not need to create or copy/paste the bundle?
    Is it possible to deploy the bundle as a shared library? Even if their is nothing else, not even a single java class?
    Edited by: Yannick.O on Jul 28, 2010 10:45 AM

    Try to create a JAR with the resource file in it (under /META-INF) and add it as a library in your project.
    If it does not work, try to create a faces-config.xml file inside that directory that declares the resource file.
    I think it gets merged at runtime with the config of your application and resource bundle should be available.

  • How to deal with resource bundle in multiple applications system

    Hi all,
    I'm building new system depend on the method of
    one common model with multiple applications for the view objects
    my JDeveloper version 11.1.2.3
    my Question
    How can i merge the resource bundle for these applications
    as in the common model exists file for resouce bundle
    and each other applications contains resource bundle files how can i merge all these file in one Resource bundle file ?
    Edited by: 985756 on Apr 2, 2013 12:39 AM

    Hi,
    Please check anerjusb blog for your answer
    Hoping this will help you.
    http://andrejusb.blogspot.in/2009/12/reusing-resource-bundles-from-different.html
    Thanks & Regards,
    Vikas

  • Problem using Resource Bundle in XSLT File

    Hi All,
    I've been trying to use Resource Bundle on my XSLT file with no success for the last 2 weeks. So I would like some help to definitely end this problem.
    The fact is that i have a property file that i would like to read and it works fine when i use jsp or a servlet however when i try to call the same property file using my XSL i get the message below:
    java.util.MissingResourceException: Can't find bundle for base name thoth, locale en_US
    Follow the code from my Stylesheet that i'm calling the resource bundle:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:java="java.util.ResourceBundle" exclude-result-prefixes="java" version="1.0">
    <xsl:strip-space elements="*"/>
    <xsl:output method="html" indent="yes" version="4.0"/>
    <xsl:output encoding="ISO-8859-1"/>
    <xsl:template match="page">
    <html>
    <body>
    <xsl:apply-templates select="paragraph"/>
    <xsl:variable name="resources" select="java:getBundle('thoth')"/>
    <xsl:value-of select="java:getString($resources,'general.title')"/>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>
    Please someone could help me why this file cannot be located, I am 100% of sure the property file path is in my classpath since it works fine in a servlet. Should i have to put it some other place? Do i have some other way to read this file and show the information from the file?
    I would appreciate any help
    thanks in advance and Regards
    Fabio

    Please someone could help me why this file cannot be located, I am 100% of sure the property file path is in my classpath since it works fine in a servlet.
    Is the property file in your classpath? or whether the directory where the property file is residing is in your classpath. Please put only the directory where the property file is located in the classpath and try again.
    It may be working fine with the servlet because j2ee servlet containers put the classes and lib directory automatically in the classpath therefore resource bundle gets loaded even without putting it explicitly in the classpath. This doesn't happen when you try to test some component from the console.
    Let me know if this does not work.
    regards,
    Abhishek.

  • How to enumerate keys in Resource Bundle?

    Is there any way to enumerate all the keys (but not the values) of resource bundle?

    If rb is a ResourceBundle, you can enumerate the keys and values in its 'content' property with the following code:
    for (var key:String in rb.content)
        var value:* = rb.content[key];
    Gordon Smith
    Adobe Flex SDK Team

Maybe you are looking for

  • Issue with set and get paramter

    Hi all, i am using set parameter id  in a module pool program and get parameter id in the FM . say iam passing a value ABC. IN BETWEEN USING THE FM IF I OPEN SE38 THEN I SEE THE VALUE ABC IN THE PROGRAM NAME. is there any thing that i need to do afte

  • How to create a wallet in oracle RAC environment

    How to create a wallet in oracle RAC environment. While running following command "alter system set encryption key identified by "thalesdata4"; I am getting error message "cannot auto create wallet" or "failed to open wallet. Please suggest correct w

  • Format of Functional Specification

    What is the format of Functional Specification.

  • Just made the switch and running into problems immediately

    Been a lifelong PC user and switched to a MacBook Pro with the update yesterday. I got home, charged it up immediately, and went for my initial boot-up. First problem, right as I'm finalizing setup and creating my login and password, I get a "you mus

  • Report Status is Not Displaying in My history

    Hi All, There is no history details are displayed in history but it was appear in schedule tab. Can anyone tell me how to fix it Regards