Change NSString encoding

Hi.
I am making a TableView app here's my code :
http://pastebin.com/myvW9ixk
Is there anyway to change factsFile's (NSString) encoding ? Because the file that i download is in ISO Latin.
Thanks,
Senly
Message was edited by: Senly

You are using a deprecated method. You should use one of the newer "initWithContentsOfURL" methods that has more explicit handling of the encoding. You can either use the "usedEncoding" variety that will try to figure out the encoding or the "encoding" version that allows you to specify the encoding. A wise approach would be to try the former, and if that fails, then the latter.

Similar Messages

  • How to change default encoding in DataBindings.cpx

    Hello,
    How to change default encoding in DataBindings.cpx,
    on windows-1251 for instance?

    I've filed Bug# 3147045 for this. Our DataBinding.cpx file and UIModel XML files seem to be getting hardcoded to use the ISO-8859-1 encoding. Our ADF Business Components XML files correctly pickup the IDE encoding.

  • How to change the Encoding type of a XML

    Hi all,
    I'm having a XML(generated at run time) with UTF-8 Encoding. If I'm going to parse it, getting an error saying "*Document root element is missing*".
    If I change the encoding to ANSI, it parses without error.
    How can I change the encoding type of a documnet ?
    Any comment welcome.
    Kaushalya

    There's no such thing as the "encoding of a String". If you produced a String from a sequence of bytes using the wrong encoding, you may not be able to repair that problem by hacking about in your code. You're better off to produce the String using the correct encoding in the first place. Read this for more information about XML and encodings as you appear to be misunderstanding basic concepts:
    [http://skew.org/xml/tutorial/]

  • Change of Encoding in Sender JMS Adapter

    Hi,
       My scenario is like that:-
    FTP->MQ Queue->JMS Queue->XI->R/3
    From JMS Queue IDOC xml is coming in UTF-8 encoding to XI. In that IDOC xml certain special characters are there, say, some Latin or European character. But for the scenario XI->R/3, data are not getting posted to R/3. In XI side, it is not giving any error, but it is giving a flag (in QRFC Monitor) which is “ Error between two Character Sets”.
    I am unable to rectify this error. One solution I have guessed that is, it will be possible to resolve this issue if I can change the encoding in XI to ISO-8859-1. But I don’t know how to change the encoding in Sender JMS Adapter in XI. Could you please help me to resolve this issue?
    BR
    Soumya B

    Hi,
    Check following:
    1. In SXMB_MONI, what is the XML structure generated for inbound and outbound message. Check the encoding used in both. This could be checked by looking at the first line of XML generated. For UTF encoding, usually, the first line should look as follows:
    <?xml version="1.0" encoding="UTF-8" ?>
    2. If the encoding for both is different, try to figure out which encoding is used for Message Type in XI. For matching the encodings, you could change the XSD used for creating message type in XI. This way, the character encoding could be changed. And this solution should suffice if the problem has occured between XI to R3 scenario.
    Also, for learning more about character encodings, you could visit following link:
    http://www.cs.tut.fi/~jkorpela/chars.html
    Hope it helps.
    Bhavish.
    Reward points if comments found useful:-)

  • File adapter - change of encoding in the header of the xml message

    Hello!
    I would like to change the encoding in the header of an xml message (sent to a a receiver file adapter)
    from <?xml version="1.0" encoding="UTF-8" ?>
    to <?xml version="1.0" encoding="ISO-8859-1" ?>
    We have XI 3.0 with SP15.
    Can anybody help me please?
    Kind regards
    Chris

    Hi Chris,
    An XSLT map can convert the encoding for you. 
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method='xml' encoding="ISO-8859-1"/>
      <xsl:template match="@*|node()">
        <xsl:copy>
          <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
      </xsl:template>
    </xsl:stylesheet>
    Thanks,
    -Russ

  • Change JVM encoding in OC4j

    Hi,
    I have deployed my application in oracleAS. but when I try to install it, It is impossible as the encoding of my application is not the same as JVM file encoding.Both should be UTF-8.
    How is it possible to change JVM encoding in an OC4j instance of OracleAS?
    Regards,
    Immy

    What do you mean by encoding of your application? what exactly is the error / problem you are getting?

  • Changing character encoding in ps xml pub. from utf-8 to iso-8859-1

    I am using xml publisher to generate a report in a pdf format, now my problem is user has entered a comment which is not supported by utf but in iso-8559-1 its working fine,
    I tried to change the encoding in people code, xml doc file ,schema and xliff file but still the old formatting exist,should I change somewhere else.
    Following the error i get when trying to generate pdf:"Error generating report output: (235,2309)Error occurred during the process of generating the output file from template file, XML data file, and translation XLIFF file.".The parser is not able to recognise with utf-8 encoding.

    I had the same issue. I created the xml through rowset and used string substitute function and its working.
    Sample:
    &inXMLDoc = CreateXmlDoc("");
    &ret = &inXMLDoc.CopyRowset(&rsHdr);
    &sXMLString = &inXMLDoc.GenFormattedXmlString();
    &sXMLString = Substitute(&sXMLString, "<?xml version=""1.0""?>", "<?xml version=""1.0"" encoding=""ISO-8859-1""?>");
    hope this helps!
    GN.

  • Changing the encoding to 256 kbps from the standard 128 kbps

    I just read an article on the Internet about earbuds, especifically the Shure 4c, in which it was "highly reccomended" to change the encoding to higher levels such as 256 kbps from the "standard" 128 kbps.
    The question is, once you have all your songs in iTunes downloaded at the standard 128 kbps, how do you change the encoding to 256 kbps, without deleting everything and transfering all your CDs, etc, all over again? Can it be done without the obvious, do it all over?
    Thanks

    Pedro, this will not be possible. You can't convert a lower bitrate to a higher one & gain anything in quality. The maximum data has already been compressed & removed under the lower bitrate & can't be put back. If you truly want the benefits of the higher bitrate, it would be much better to re-import your CD's at the 256 bitrate. Post back if you have any questions.

  • Change db2 encoding to utf in String field

    Hi Gurus,
    We need to retrieve a field from db2 and send it to Siebel via Web Service in order to insert that data. We are having trouble with the encoding and we were wondering if there is any function to change encoding from db2 to utf so we can add it to our xml.
    We believe that changing the encoding will insert it propperly in Siebel.
    Thank you very much,
    Alvaro

    Hi Alvaro,
    What is the technology of your staging area ?
    In Oracle, you have a function to do that kind of change : http://docs.oracle.com/cd/B28359_01/server.111/b28286/functions027.htm .
    If your staging is not Oracle, you can probably find something similar.
    You can apply it to all your string mappings. If you always use that function for string data with these technology, you can also edit your KM and put the function in it.
    Regards,
    JeromeFr

  • Why JSTL change the encoding of response?

    Dear all,
    I use JSTL to display multiple language, and it can work fine. I also have a servlet to let the user to select the display language. All the request and response encoding is set to UTF-8, but I found that when user choose language to Chinese, and the servlet set the Locale to ZH, and then, all the jsp file which use JSTL to display message, the response is set to "GB2312"!
    Why this happen? because the response encoding is gb2312, so I cannot get the user inputted Chinese character! I want still reserve the UTF-8, how can I do that? I just found that webapp 2.4 can set locale-encoding-mapping, but I am using tomcat4.1.4, which does not support 2.4.
    Any advice will be appreciate.
    Lichunlin

    Hi, everyone,
    I find that the setLocale method of Reponse will change the response encoding automatically according to the locale, for example, the page encoding is UTF-8, but after I set locale to "CN"(china), the encoding is changed to "GB2312", but I still want it is "UTF-8".
    So I have to change the message tag source code, to change the encoding back after the setLocale method invoke, it is not so good, but it can work now.
    Could you have any other advice? Thank you very much.
    Lichunlin
    Dear all,
    I use JSTL to display multiple language, and it can
    work fine. I also have a servlet to let the user to
    select the display language. All the request and
    response encoding is set to UTF-8, but I found that
    when user choose language to Chinese, and the servlet
    set the Locale to ZH, and then, all the jsp file which
    use JSTL to display message, the response is set to
    "GB2312"!
    Why this happen? because the response encoding is
    gb2312, so I cannot get the user inputted Chinese
    character! I want still reserve the UTF-8, how can I
    do that? I just found that webapp 2.4 can set
    locale-encoding-mapping, but I am using tomcat4.1.4,
    which does not support 2.4.
    Any advice will be appreciate.
    Lichunlin

  • How Can i change the Encoding for Mp3 cds???

    I am curious on how i can chane the Encoding With on i tunes.....The reason is im heavily into car audio and always like to see the names of the bands and song title come up when i play them in my car. Ive noticed certain bands show up on the screen of my cd player..but others say no artist. Ive Also noticed some have a different encoding such as Lame 3.96....... Does Anyone Know How to Change the Encoding With....Or Make it Show up on my car cd player?

    Do you mean you'd rather import using say AAC for instance instead of mp3?
    Go to iTunes Preferences (+,)>advanced>importing>import using> change to which ever format you desire.
    When you burn the cd, check "include CD text" under the audio section if you're burning an audio CD.

  • HT1645 I did step 2 but my computer isn't giving me the pop-up in step 3 so i can't push an OK button.  I waited 15+ hours for it to burn and it sent me to this page.  I have tried to change the encoding settings again, and it adjusts the capacity but no

    I did step 2 in the "iDVD:  Setting Encoding preferences" but my computer isn't giving me the pop-up in step 3 so i can't push an OK button in regards to the message.  I waited 15+ hours for it to burn and it sent me to this page.  I have tried to change the encoding settings again, and it adjusts the capacity but no message pop-up appears.

    You can undo your permission changes. Probably the most relevant one is cookies. Try one or both of these methods:
    (1) Page Info > Permissions tab
    While viewing a page on the site:
    * right-click and choose View Page Info > Permissions
    * Alt+t (open the classic Tools menu) > Page Info > Permissions
    (2) about:permissions
    In a new tab, type or paste '''about:permissions''' and press Enter. Allow a few moments for the list on the left to populate, as this information needs to be extracted from a database.
    Then type or paste ''rcn''' in the search box above the list to filter it to the most relevant domains. When you highlight a domain, you can adjust its permissions in the right pane.
    Any luck?

  • Music Stutters when changing tracks encoded using FLAC

    When changing tracks encoded with FLAC, the song stutters a bit at the beginning of each song. The rest of the song continues to play fine. It's just at the beginning when changing tracks manually.
    These very same tracks played fine with the previous firmware on the iPod and play fine on my MacBook now using iTunes.
    Anyone else running into the same thing?? Everything works, but its rather annoying!!!

    disturb wrote:
    MPD is VERY touchy when I change the current playing track, or seek.
    I've been using ncmpcpp, but I witness the same behavior with other clients too.
    Since I've seen other people mention the same stability issues, I was wondering if anyone came up with a solution for this ?
    I was hoping to use mpd to build my music db, but I 'skim' through a lot of music, so it's not usable to me right now...
    Will appreciate any help.
    Cheers
    http://wiki.archlinux.org/index.php/MPD
    Try that link out and try setting it up via user in the alternate setup.  I had issues it running as deamon... This way it will run as a local user and just add it to a start script when you start your .xinitrc or autostart.sh...
    Last edited by JuseBox (2010-01-02 11:50:17)

  • Change XML Encoding to UTF-8

    Dear SDNers:
    Hello!
    I face an issue of sending some XML documents from SAP to a non SAP System. This non SAP System stores XML documents in UTF-8 encoding format. When I create an XML document using CALL TRANSFORMATION in ABAP, the XML code generated has encoding as "ISO-...". Could anyone of you please guide me on how to have this changed to UTF-8?
    In case of no solution, I would eventually have to pick the XML generated code and replace the "ISO-..." thing with "UTF-8" at runtime within the program. However, I feel that's not a quality method.
    So, if anyone of you can suggest/opine of something better, it would be truly appreciated and rewarded.
    Have a Nice Day!
    Vivek.

    Hello Uwe:
    Currently we are on 6.20. But an upgrade is very near and I should expect these Classes to be handy then. I will explore them individually and post back. However, regarding my issue: the XML code generated by program is something like:
    <?xml version="1.0" encoding="iso-8859-1"?>#<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"><asx:values><SOURCE>42</SOURCE>
    <?xml version="1.0" encoding="iso-8859-1"?>#<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"><asx:values><SOURCE>42</SOURCE>.......
    My need here is to replace the - encoding="iso-8859-1" with "UTF-8". So if you suggest proper methods to do so then it will be a good step for me.
    Thanks for the relevant information anyways.
    Have a nice day!

  • How to change Font Encoding in PDF?

    Hi,
    We are creating PS file using 3B2 software and converting PS to PDF using Adobe Distiller 5.0 or 7.0 or 9.0.
    In the created PDF some font are encoded in ANSI and Custom and also Roman, but I want font must be In ANSI encoding.
    How can I convert Custom encoding into ANSI?
    Do Installation want to change any thing in PS file? Or there is any way to convert Custom encoding into ANSI?
    Regards
    Thirusanguraja Venkatesan

    It is not practical to do this. No tools exist because no developer would consider it necessary (all PDF tools must handle custom encodings). In the case you quote it is not even possible, because the font (math symbols) is not ASCII but symbolic.
    Why do you want to achieve this? Perhaps we can suggest an alternative resolution.

Maybe you are looking for