Sunday, November 6, 2011

Re: [android-developers] Unicode in eclipse

On Mon, Nov 7, 2011 at 9:33 AM, Scott Herbert
<scott.a.herbert@googlemail.com> wrote:
> Sorry if this is a little off topic (it's more an eclipse questron than an
> Android one, but as it's for an Android project...)
>
> What the easyist way to define non Latin text (I.e. Unicode) specifiy Arabic
> and Chinese in an Android project? When I try and copy and pasted the google
> translated version of my strings (I accept GT isn't the best way to
> internationalise an app but my budget is zero so...) eclipse doesn't
> recognised the characters. Can I just convert the characters an store the
> Unicode values? Or is their a better way?
>

Where are you copying the strings? If you are copying them to a resource
XML file (as you should), the encoding is UTF-8 so it should work
automatically.
If you are copying those in your source files as Java strings, you need to
change the encoding of your source files to UTF-8 (the default is the platform
default encoding): right click your project, select 'Resource' on the left
and change 'Text file encoding' to UTF-8.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment