I just got my app strings translated to italian but having issues in displaying them on android device.
For example, one of the word is "velocità", on the device the last character à is shown as junk character.
Any pointers on how can I resolve it. The above word is present in the raw-it folder in a .txt file.
I assume you have the txt file not encoded as utf-8. Right click on the file in Eclipse and then properties. Set it to UTF-8. (You might need to copy the text into it again to make the characters appear ok).
UTF8 encoding supports foreign language characters. Try using UTF8 encoding. if that doesnt work then the problemmight be because of the font used.Good Luck.
Related
I have ÷ in .txt file in my android. When this division symbol is shown on android device, I see "�"
To make it worse, my laptop doesn't have division sign on keyboard. I used the above sign from wikipedia.
Any guess how can I resolve this.
You should use the Unicode value for any symbols such as the division symbol you have here.
Try the Unicode U00F7.
When using it within a String format like "\u00F7".
The problem is most likely a font issue, or possibly a unicode encoding issue. The character you pasted is unicode codepoint 0xF7: if the font being used to display your text file does not have a specific glyph for this codepoint, then it will render it using some reserved glyph like the question mark diamond you show. The solution in this case would be to install and use a font which includes an appropriate glyph for this codepoint. For instance, if it is displayed correctly in your web browser, then find out what font your browser is using, and try that. Of course, whether or not you can change the font used to display your text file depends on the application (at least I think: I don't think Android fixes the font across all apps).
Alternatively, it could be an encoding problem. For instance, if you're saving your text file in Latin-1 encoding, then this character will be stored in a single byte with value 0xF7. If the app that you're viewing the file with is assuming it's UTF-8, for instance, then this byte will be interpreted as the first of a multi-byte character, or it may even be invalid. If this is the case, you just need to make sure the encoding you use to save the file is the same as the one being used to display the file. Again, this would be application specific.
I need to support multiple languages in my native app. I could properly create strings.xml file in their respective folders for various languages (Italian, Spanish, Portuguese, etc.). However, I have tough time in creating strings.xml under values-ja folder for Japanese language.
I have strings in japanese font in word document. When I copy these strings to strings.xml file in eclipse, the strings are replaced with junk characters (i assume it is due to japanese font missing in eclipse or wrong encoding). I googled for hours but couldn't find a way to fix it.
any help will be appreciated.
You have to save the strings.xml in UTF-8 format.
Follow this guide in order to save your file as a text file using the right encoding. than you can open it in eclipse or notepad to do the your copy paste
I developed an Android app it's working fine, but whenever the user login in french language the Logout button is showing like D�connexion instead of Déconnexion.
This app needs to support both English and French Languages, please help me how to solve this issue.
Thanks & Regards
I had an app with files that include arabic text. When I copy that project to another computers. all letters become a trash. The solution was to change eclipse files default encoding:
Window -> Preferences -> General -> Workspace : Text file encoding
Try:
UTF-8 and Latin-1
You mentioned that all your text come from the server. Try, to set encoding to those text to latin-1 after you receive it. worth a try. even if the server send it with UTF-8 encoding.
Set text manually in xml files. Change Eclipse default encoding until it work. then, you will know which encoding to use. it is definitely an encoding problems. as other also said.
I'm developing an Android app and when it was suposed to write words like "não" or "cabeça", with characters with "~" or "ç" for example, it writes "ã" or "ç". I already checked source files encoding and it is UTF-8.
Looks like UTF8 interpreted as ISO-8859-x.
In theory, you could supply the javac compiler -encoding UTF-8 on the command line but that would be the wrong solution.
Instead, move all your user-facing strings to an XML resource file. In there unicode character encoding works out of the box.
Further reading: http://developer.android.com/guide/topics/resources/string-resource.html
I am trying to display text in Indian regional languages on an Android app.
I've set up all the localization folders even though, I just want to have only one language for my app (say Punjabi).
In my strings.xml I have tried putting Hindi characters and Chinese characters and these are displayed correctly on the emulator. But when I put in Punjabi characters nothing shows up on the emulator.
Any reason for this? Can I overcome this problem?
I have the option of using a .ttf file in the assets folder for punjabi font. But that is not what I want to do because it does not give me complete control over the contents being displayed. Each .ttf behaves differently.
Any help is truly appreciated.
There is no support for local Indian languages on Android as yet. Hence the UTF-8 characters that fall outside the acceptable range for Android are ignored. Hence we see a blank being displayed.