• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Encodings problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Encodings problem


  • Subject: Encodings problem
  • From: TACKEL <email@hidden>
  • Date: Wed, 10 Sep 2003 14:47:33 +0100

Hi,

Im trying to write some text (with Spanish accentuated words) to a file but Im having
some encoding problems. I think Ive tried all the possible encodings but the string
wasnt write properly. More or less this is what Im doing:

---------------------------------------------------------------
NSFileHandle *filehandle;


[filemng createFileAtPath: [@"~/Desktop/file.txt" stringByExpandingTildeInPath]
contents: nil attributes: nil ];

filehandle = [NSFileHandle fileHandleForWritingAtPath : [@"~/Desktop/file.txt"
stringByExpandingTildeInPath]];

[filehandle writeData: [@"el camisn elictrico"
dataUsingEncoding:NSUTF8StringEncoding]];
----------------------------------------------------------------

And that's the line I find in the file:

el cami??n el?)ctrico


Where is my error?

Thanks,
Tackel.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Encodings problem
      • From: Chris Ridd <email@hidden>
  • Prev by Date: Re: MiscKit
  • Next by Date: Encodigns problem
  • Previous by thread: Problems iterating folders
  • Next by thread: Re: Encodings problem
  • Index(es):
    • Date
    • Thread