Re: NSString looses Umlaute
Re: NSString looses Umlaute
- Subject: Re: NSString looses Umlaute
- From: Joar Wingfors <email@hidden>
- Date: Thu, 22 Dec 2011 01:29:15 -0800
On 21 dec 2011, at 16:45, Alexander Reichstadt wrote:
> NSString eats the Umlaute. How do I tell NSString to not do that?
If you provide the correct encoding when creating a NSString from an external representation, all will be well. If you don't, then you'll end up with the type of issues that you've been reporting here. This is all very simple and straight forward. The only way that you really can screw up is by providing an encoding that doesn't match with the string data that you're trying to interpret. That and, I guess, not providing "valid" string data - Which leads me to:
On 22 dec 2011, at 00:13, Alexander Reichstadt wrote:
> This is a DBF file. From the DBF file format description the header is binary and the rest is ASCII.
Are you stripping out the header before trying to interpret the data as a string?
> I don't want to write a DBF parser, I only want to read this specific file and it does correctly read all fields and lines, but the Umlaute are still lost. It does work correctly on the Windows side using the browser app for that particular database.
The other tools that you've mentioned, maybe they're actually parsing the file - And not simply trying to load the whole thing as text?
Joar
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden