;>> Aki
>>>
>>> On 2012/06/12, at 12:42, koko wrote:
>>>
>>>> I have international users who may have things like umlaut in file names /
>>>> paths which I may get as CStrings given our Model.
>>>>
>>>> What NS st
esentationWithPath:] and
>> -[NSFileManager stringWithFileSystemRepresentation:].
>>
>> Aki
>>
>> On 2012/06/12, at 12:42, koko wrote:
>>
>>> I have international users who may have things like umlaut in file names /
>>> paths which I may get a
ave things like umlaut in file names /
>> paths which I may get as CStrings given our Model.
>>
>> What NS string encoding should be used to preserve the umlaut and not crash?
>> Is NSUTF8 OK?
>>
>> -koko
>>
>>
>>
>>
>> __
:
> I have international users who may have things like umlaut in file names /
> paths which I may get as CStrings given our Model.
>
> What NS string encoding should be used to preserve the umlaut and not crash?
> Is NSUTF8
On 12 Jun 2012, at 12:42 PM, koko wrote:
> I have international users who may have things like umlaut in file names /
> paths which I may get as CStrings given our Model.
>
> What NS string encoding should be used to preserve the umlaut and not crash?
> Is NSUTF8 OK?
UTF-8 ca
I have international users who may have things like umlaut in file names /
paths which I may get as CStrings given our Model.
What NS string encoding should be used to preserve the umlaut and not crash? Is
NSUTF8 OK?
-koko
___
Cocoa-dev mailing
Thanks, John. I'll give it a shot!
-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin
http://www.nemesys-soft.com/
Logiciels Nemesys Software
laur...@nemesys-soft.com
On Apr 27, 2011, at 12:35, John Pannell
Hi Laurent-
Certainly. I've zipped up two classes that wrap some functionality from the
Text Conversion Manager functions. I'm certain I got these from somewhere else
years ago, but failed to find them now. Download at:
http://www.positivespinmedia.com/dev/TEC.zip
Usage looks something like
John,
Not sure if you read my last email on the topic but using the
NSAttributedString initWithURL:encoding:documentAttributes: is failing. I have
read a bit about the Text Conversion Manager but if you had already some code
you could share, that would spare me reinventing the wheel!
Thanks in
On Apr 26, 2011, at 11:43, Nick Zitzmann wrote:
> On Apr 26, 2011, at 12:13 PM, Laurent Daudelin wrote:
>
>> I've found different ways to do that (some pure Cocoa, some using Carbon)
>> but I was wondering about the wisdom of this list as to what is the best way
>> to detect the encoding of a f
Thanks, John. I'll have a look and let you know if I need more help!
-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin
http://www.nemesys-soft.com/
Logiciels Nemesys Software
laur...@nemesys-soft.com
On Apr 26, 20
Laurent Daudelin wrote:
I've found different ways to do that (some pure Cocoa, some using
Carbon) but I was wondering about the wisdom of this list as to
what is the best way to detect the encoding of a file before
passing it to NSString initWithContentsOfFile:encoding:error:?
You might
Another battle tested piece of code would be Mozilla's sniffer, if external
libraries and it's license suit you.
This document is out of date, bur explains the ideas.
http://www.mozilla.org/projects/intl/detectorsrc.html
On Apr 26, 2011, at 3:39 PM, John Pannell wrote:
> Hi Laurent-
>
>
Hi Laurent-
I have an app that collects a lot of text off the web; my string creation
algorithm is something like the following:
1. Attempt to create an NSString with NSUTF8StringEncoding.
2. If the string is nil, attempt to create the string using the encoding
returned from the server.
3. I
On Apr 26, 2011, at 12:49 PM, Laurent Daudelin wrote:
>> TextEdit's encoding guesser just uses the built-in NSAttributedString method
>> -initWithURL:options:documentAttributes:error:, which will guess the file's
>> encoding when opening it. But it has been mentioned that heuristics are not
>>
On Apr 26, 2011, at 11:43, Nick Zitzmann wrote:
> On Apr 26, 2011, at 12:13 PM, Laurent Daudelin wrote:
>
>> I've found different ways to do that (some pure Cocoa, some using Carbon)
>> but I was wondering about the wisdom of this list as to what is the best way
>> to detect the encoding of a f
On Apr 26, 2011, at 12:13 PM, Laurent Daudelin wrote:
> I've found different ways to do that (some pure Cocoa, some using Carbon) but
> I was wondering about the wisdom of this list as to what is the best way to
> detect the encoding of a file before passing it to NSString
> initWithContentsOf
Obviously, there are sometimes overlaps between encodings when you're
trying to guess.
http://en.wikipedia.org/wiki/Bush_hid_the_facts
-Heath Borders
heath.bord...@gmail.com
Twitter: heathborders
http://heath-tech.blogspot.com
On Tue, Apr 26, 2011 at 1:18 PM, Dave DeLong wrote:
> You'd have t
You'd have to guess (by reading the first few bytes of the file, seeing what
they are and how they're laid out, etc), or use the
initWithContentsOfFile:usedEncoding:error: variant to let NSString guess for
you.
Dave
On Apr 26, 2011, at 11:13 AM, Laurent Daudelin wrote:
> I've found different
I've found different ways to do that (some pure Cocoa, some using Carbon) but I
was wondering about the wisdom of this list as to what is the best way to
detect the encoding of a file before passing it to NSString
initWithContentsOfFile:encoding:error:?
-Laurent.
--
Laurent Daudelin
AIM/iChat/
Hey,
Thanks! It seems that all I had to do sanitize was encode &'s <'s >'s "'s and
''s, and then just do my normal percent encoding, and everything is now working
great!
Thanks!
Joe
On Jul 23, 2010, at 2:11 PM, Kyle Sluder wrote:
> On Fri, Jul 23, 2010 at 11:54 AM, Joe Turner wrote:
>> Howev
On Fri, Jul 23, 2010 at 11:54 AM, Joe Turner wrote:
> However, now it seems my issue is with &'s in the data itself from the
> property list. If the plist contained an "&" somewhere, everything after that
> point is cut off (which makes sense). Is there any way around this? It seems
> I have to
However, now it seems my issue is with &'s in the data itself from the property
list. If the plist contained an "&" somewhere, everything after that point is
cut off (which makes sense). Is there any way around this? It seems I have to
percent escape the data before posting, which (the only way
On Fri, Jul 23, 2010 at 9:34 AM, Joe Turner wrote:
> Hey,
>
> No one is requiring me to send a string–I do indeed send it as data, but I
> must convert values from string to data. Like, I have a title field, in which
> I must convert the title to NSData. But since there are a bunch of arguments
Hey,
No one is requiring me to send a string–I do indeed send it as data, but I must
convert values from string to data. Like, I have a title field, in which I must
convert the title to NSData. But since there are a bunch of arguments like
this, I just make a string like @"arg1=something&arg2=s
On Thu, Jul 22, 2010 at 6:25 PM, Joe Turner wrote:
> I'm having an issue with NSPropertyListSerialization, where I will call
> dataWithPropertyList:format:options:error:, to get the data from a property
> list–this part goes fine. However, then I need the data as a string, so I can
> upload it
On 7/22/2010 6:25 PM, Joe Turner wrote:
I'm having an issue with NSPropertyListSerialization, where I will
call dataWithPropertyList:format:options:error:, to get the data from a
property list–this part goes fine. However, then I need the data as a
string, so I can upload it to a web service. Ho
Hello,
I'm having an issue with NSPropertyListSerialization, where I will call
dataWithPropertyList:format:options:error:, to get the data from a property
list–this part goes fine. However, then I need the data as a string, so I can
upload it to a web service. However, when I call initWithData:
AAARGH!
This is a Cocoa question (and I thought I was replying to the Cocoa
list too). Sandeep, please don't BCC mailing lists, and please post
questions in *one* place---even if you're not sure, someone will tell
you where to ask if it isn't right. (And apologies to the ObjC list
for c
Sir,
i want to convert a NSString to CString using Unicode Encoding.
strcpy(cString, [nsString cStringUsingEncoding:NSUnicodeStringEncoding ]);
(or)
CFStringGetCString((CFStringRef)nsString],
cString,1024,
CFStringConvertNSStringEncodingToEncoding(NSUnicodeStringEncoding));
Here i am co
30 matches
Mail list logo