locale question - spanish

5 views
Skip to first unread message

Bob

unread,
Jul 8, 2009, 3:01:04 PM7/8/09
to iPhone SDK Development
Does anyone know how to deal with tilde N's
(that is, the tilde over an 'n') in spanish characters?

How do I generate a text file that correctly displays
in iphone?

I have the file itself someone who translated things
gave me which was generated correctly, but when
I view it in 'vi' it shows as ~V or the tilde N characters.

Is there something I have to do to generate a second
text file to use it in iphone so it will display correctly?

Any help is appreciated on this topic
Thanks

David Phillip Oster

unread,
Jul 8, 2009, 6:03:33 PM7/8/09
to iPhone SDK Development
Generally, when you read from disk on Cocoa (Touch) you specify the
character set of the input. for example:
[NSString stringWithContentsOfURL:yourURL
encoding:NSUTF8StringEncoding error:nil];

On the computer that has vi, use a character-set-aware editor instead.
For example, Xcode's menu bar has View > Text > File Encoding where
you can tell the editor how the file should be interpreted in the
editor. By default Xcode will convert .strings files like
Localizable.strings files to UTF-16 as it copies them into the
application bundle.

Andy Fuchs

unread,
Jul 9, 2009, 5:26:43 AM7/9/09
to iphonesdkd...@googlegroups.com
Just type ALT-N and then again 'n'...

Should display correctly on iPhone, if it is saved as UTF-8

And - just a personal tip: forget vi if you do localization and use a
Unicode-capable text-editor.

a.

Bob

unread,
Jul 10, 2009, 11:12:28 PM7/10/09
to iPhone SDK Development

On Jul 9, 2:26 am, Andy Fuchs <a...@elgato.com> wrote:
> Just type ALT-N and then again 'n'...
>
> Should display correctly on iPhone, if it is saved as UTF-8
>
> And - just a personal tip: forget vi if you do localization and use a
> Unicode-capable text-editor.
>

Ok thanks for the helpful hints. Turns out the text file is
just fine, it was vi. I primarily use Linux, but when I opened
it on the mac, everything is fine (since someone create it
for me I wasnt sure what was up).

What I do is I run a C program I made to
take a text file and convert it into an sqlite DB, and after
looking at things I think its that step that I needed to fix.
There are some UTF16 calls in sqlite that I think I need to
use, Im going to go try that out now. Hopefully thats my
main issue.

Thanks again
Reply all
Reply to author
Forward
0 new messages