Xcode 4 default text encoding

How do I set the Xcode 4 default text encoding?
I've tried to set it in Preferences > Text Editing > Default text encoding, but it takes no effect over my workspace and all my files.
When I open the File Inspector, the default text encoding is always set to Western (Mac OS Roman) regardless of configured preference.
Thanks in advice!

I've used the xattr on some files, but there is no extra properties defined.
Seems that Xcode need the BOM (byte order mark) to be present at the beginning of the file so the encoding gets detected successfully.
I've tried to add the sequence \xEF\xBB\xBF to the beginning of some files, and Xcode detects UTF-8 and the content is shown properly.
The problem now is that I have lots of files on my project, and add the BOM to the beginning of each file is inviable.

Similar Messages

  • How to Force Big5 default text encoding?

    i tried the typical:
    defaults write com.apple.mail NSPreferredMailCharset “...”
    and tried replacing "..." with "big5" which is what is shown in the raw source of my incoming messages from coworkers. However the result is still ASCII or whatever.
    Any ideas? I hate manually changing this for every message.

    I just cant find out how to do it permanently for all outgoing messages instead of me doing it manually for every message.
    Thanks for the clarification. I guess the old terminal command no longer works to do what you want. I suspect if you set your OS to Trad. Chinese, Mail may use Big5 as the default for outgoings (instead of the standard UTF-8).
    You might want to ask whether anyone knows of a new way to do this on the Chinese Mac list:
    http://groups.google.com/group/chinesemac/

  • Text Encoding (Big 5) not being auto-detected

    I just had to reinstall OS X (10.4, the upgraded to 10.4.9) due to a bad crash. In Safari (2.0.4), I tried to view a particular page.
    http://www.ettoday.com/
    This is a Big-5 (chinese) encoded page; I have my Default Text Encoding set to Western (ISO Latin 1), and the page looks garbled when I try to view it, unless I go to View->Text Encoding->Traditional Chinese (Big 5), and then it displays correctly. My question is, why isn't this encoding being auto-detected and display correctly without manually setting it? Looking at the source, about 22 lines down there is this:
    <meta http-equiv="ªF´Ë·s»D³ø" content="text/html; charset=big5">
    which looks like the appropriate specification of the encoding. Can someone who has chinese fonts installed please verify this? Is this something Safari is doing wrong, or possibly something got lost in my system reinstall (to tell the truth, I can't recall specifically if this was a problem prior to my crash).
    Thanks,
    David

    Ok, thank you. I gave up trying to understand html right around when the "blink" tag came out, and I just get paranoid every time I do a reinstall that I'm missing some critical part. I like the validator-- never knew about that.
    Now, if you do a search on the source code for that ETToday page, somewhere far down you'll come to another section that reads:
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=big5">
    blah blah blah
    This does appear to be properly formatted, and maybe it's there specficially for English-default browsers. However, perhaps neither Safari nor the validator are picking up this, or maybe it's referring to something else altogether?
    thanks,
    dave

  • Default Character Encoding stuck on UTF-8 - Firefox 7

    I cannot change the Character Encoding - it is stuck on Unicode UTF-8 and I can not change it! When a web page opens I get these little boxes with "FF FD" instead of Quote marks. When I change the character encoding on that page using "View->Character Encoding" and click on the Western (ISO-8859-1), the page displays correctly. Every page opens using Unicode UTF-8 as the default.
    View->Character Encoding -- shows Unicode UTF-8 as the default.
    View->Character Encoding->Auto-detect -- shows OFF
    Tool->Options->Content->Advance->Fonts->Default Character Encoding -- shows Western (ISO-8859-1) as well as the "Allow Pages to choose their own fonts..." IS CHECKED in the check box
    THE PAGES ARE NOT UTF-8!!!! The "View Page Source" IS NOT Unicode UTF-8! -- It shows <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">.
    The "View Page Info" shows MetaTag - Content-Type: text/html; charset=iso-8859-1
    Why can I not change the Default Character Encoding?
    I would also like to point out that the Unicode UTF-8 seems to be broken because it is indicating that the QUOTE CHARACTER is an UNPRINTABLE character "FF FD"
    ----- EDIT -----
    The UTF-8 is not broken. The problem as pointed out in http://en.wikipedia.org/wiki/Replacement_character#Replacement_character is that my Firefox being STUCK processing UTF-8 encoding cannot read the clearly marked iso-8859-1 data. So the UTF-8 is reinterpreting smart quotes -&ldquo; and &rdquo;- (“ and ”) as replacement (unprintable) characters.
    So the real problem is why my Firefox is stuck on Unicode UTF-8

    The real problem is that the font that is used doesn't have those characters.
    Do you see the special quotes -“ and ” on this forum page?
    Does it help if you disable the website fonts and set another font as the default font?
    *Tools > Options > Content : Fonts & Colors > Advanced
    *http://en.wikipedia.org/wiki/Punctuation
    *http://en.wikibooks.org/wiki/Unicode/Character_reference/2000-2FFF

  • Script/Automator action/CSS to change text encoding?

    As an expat Israeli, I read an Isareli newspaper online every day. Most pages on their site <http://www.haaretz.co.il> display fine with the text encoding set to Default. Some, though, forget that Hebrew is written right-to-left, and insist on displaying everything backwards, which makes it a bit hard to read.
    To get such a page to display correctly I need to change the text encoding to Hebrew (Windows). However, it gets a bit boring to go to the View menu, scroll down to Text Encoding, then scroll down again to Hebrew (Windows), especially when I have to do it several times a day.
    So, I thought automating this procedure would be the way to go. Problem is I cannot find either Automator actions or Applescript Dictionary items that relate to text encoding.
    Skating on thinner ice, I think a style sheet could help tell Safari to display a page with the right text encoding, but:
    1. I have no idea how to write such a style sheet.
    2. When I looked at the source HTML of a page that displays correctly, and one that doesn't, I find that both include the following tags:
    charset=windows-1255 (inside a larger META tag), and
    <META HTTP-EQUIV="CONTENT-Language" CONTENT="he">
    These are the tags that, I thought, would allow me to distinguish between a "good" page and a "bad" one. But if both contain the same tags...
    Any ideas on how I can automate this text encoding switch?
    TIA,
    Gidi
    iMac G5   Mac OS X (10.4.8)  

    I agree with you that the authors are doing something
    not exactly kosher. But if I will complain, I know
    their knee-jerk response: Ahhh, you're using a
    Mac...
    I don't see how a windows browser could display it correctly either. Win-1255 has to be logical order, and they probably have some guys composing articles in visual order and then copy/pasting them into the Win-1255 pages without paying attention.

  • Setting the default character encoding

    How do you set the default character encoding for the portal to UTF-8 so that unicode
    characters work within porlets?
    Any help would be much appreciated,
    Troy

    You can put this tag in the portal.jsp in the header:
    <meta http-equiv='Content-Type' content='text/html;charset=UTF-8'>
    "Troy" <[email protected]> wrote:
    >
    That doesn't seem to work when put into my portlet's content JSP. Is
    there another
    place I could put the page directive that will control the entire portal
    page?
    "Sai S Prasad" <[email protected]> wrote:
    Troy,
    you can try the page directive with encoding as:
    <%@ page contentType="text/html";charset="UTF-8" %>
    "Troy" <[email protected]> wrote:
    How do you set the default character encoding for the portal to UTF-8
    so that unicode
    characters work within porlets?
    Any help would be much appreciated,
    Troy

  • Running mac OS 10.5.8, Using Mail 3.5, Text encoding set to Automatic. messages arrive, but the message is 200  lines of alphanumerics. Top says Content-Type: text/plain;      charset=utf-8 Content-Transfer-Encoding: base64.

    I use Mail 3.6 and some incoming email messages start with
    Content-Type: text/plain;
        charset=utf-8
    Content-Transfer-Encoding: base64
    then go on to 200+ lines of alphanumerics (mostly upper and lower case letters). 
    What causes this problem, how can I fix it?
    Text encoding is set to Automatic, and  I'm not using any fancy fonts.  Senders are usually
    sending from PCS that may well use Outlook.
    Rosemary C.  Chicago

    Does it look something like this...
    JVBERi0xLjYNJeLjz9MNCjMyNCAwIG9iag08PC9GaWx0ZXIvRmxhdGVEZWNvZGUvRmlyc3QgNi9M
    ZW5ndGggMTU4L04gMS9UeXBlL09ialN0bT4+c3RyZWFtDQohx6hAp7lMT4WVkGpP6z3UpIQfO4eN
    QRbgjhTqX5mfaabWcvQk/hLnUX6MpKiXwist+RiaiGrzj8XGSNFXuvETWsnoPoV687Exvzo1KYV4
    jIuPmKXlRJvESTE/K2htJihPMS/o6fo3i+nHbTBRWpyrXSfmCPVEgsAzcyECvSU0Rz4MJsEXpdu6
    6u/hg1hlPkb2gpkUQJv50YtWhkD/Jg0KZW5kc3RyZWFtDWVuZG9iag0zMjUgMCBvYmoNPDwvRmls
    Check Mail>View>Message, does it say View Raw Source, Long Headers, or Default Headers?
    See if view Plaintext version helps.

  • Setting text encoding for Flash when being used

    Many Korean web sites use Flash, and many of them are made in
    the text encoding "windows Korean"
    when I use windows it shows those sites as intended because
    the text encoding of flash player in windows is set to "windows
    Korean"
    but on my mac, I believe Flash player uses UTF-8 regardless
    of my web browser setting and many Korean Flash web sites don't
    work as intended.
    Is there something I can do to make them show windows-Korean
    encoded characters? Any suggestion appreciated. Thank you.

    Ok, thank you. I gave up trying to understand html right around when the "blink" tag came out, and I just get paranoid every time I do a reinstall that I'm missing some critical part. I like the validator-- never knew about that.
    Now, if you do a search on the source code for that ETToday page, somewhere far down you'll come to another section that reads:
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=big5">
    blah blah blah
    This does appear to be properly formatted, and maybe it's there specficially for English-default browsers. However, perhaps neither Safari nor the validator are picking up this, or maybe it's referring to something else altogether?
    thanks,
    dave

  • DB2 with iso-8859-15 text encoding

    Hi,
    I develop an application on weblogic server configure with a db2 data source. The application is using hibernate 3 (jpa). I cannot write correcly some characters in the database. Text encoding is not converted from utf-16 (java string) to iso-8859-15. Weblogic is installed with the last db2 jdbc driver (9.7).
    Is there a data source property that inform the driver to convert utf-16 to the db2 encoding ?

    Is the value (text) of header outputText a static text or it is binded to some bindings attribute or backing bean attribute?
    If it is a static text then probably the JSF page encoding (not only the JSP tag specifying the encoding, but the whole file) may be broken. Once I had similar issues, and the only thing that helped was to Ctrl+A, Ctrl+X, Ctrl+V (cut all content of file and paste it back - it restores messed-up utf-8 encoding).
    If it is not a static text, then check the "source" of the text: it should be the java class file also encoded in utf-8 (also, check Compiler options for your projects - plural). Also, chcek the default IDE encoding... Finally, the database also should have utf-8 encoding (if you are retrieving data from database to show in these header outputTexts).
    As I stated before, I had a lot of issues and finally I learned that EVERYTHING should be set correctly to utf-8 in order not to have these strange effects...
    Have in mind that Java is very complex in terms of string/text encodings, much more complex than e.g. MS.Net. Internally, Java uses utf-16 encoded strings while most of web applications use utf-8 (for efficiency reasons). So, the gap between Java and web is present, and legacy Java encodings support is quite impractical in modern applications where no one should ever have reason to use anything else than utf-8!

  • Why ServletRequest and ServletResponse default data encoding is ISO8859-1?

    why ServletRequest and ServletResponse default data encoding is ISO8859-1 not System default file.encoding?
    So if my servlet contents Chinese charactors it can't write once runs any system with different encoding types.
    for example:
    import java.io.*;
    import java.util.*;
    import javax.servlet.http.*;
    import javax.servlet.*;
    public class HelloServlet extends HttpServlet {
      public void doGet (
         HttpServletRequest     req,
         HttpServletResponse     res
        ) throws ServletException, IOException
        res.setContentType("text/html");
        String hello = "Hello world &#19990;&#30028;&#20320;&#22909;";
        PrintWriter pw = res.getWriter();
        pw.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">");
        pw.println("<head>");
        pw.println("<title>" + hello + "</title>");   
        pw.println("</head>");   
        pw.println();
        pw.println("<body>");
        pw.println();
        pw.println("<h1>" + hello +"</h1>");
        pw.println("</body>");
        pw.close();
      public HelloServlet() {}

    A server parses parameters using the common ISO 8859-1 charset. When a browser uses another charset, it is supposed to send the encoding information in the Content-Type header of the request, but almost no browsers do.
    In the Servlet 2.2 API (e.g Tomcat 3.x), the methods that parse parameter input always assume that it's sent as ISO 8859-1. So they create a String containing the correct bytes but incorrect charset.
    In that case, you can use the com.oreilly.servlet.ParameterParser class and its setCharacterEncoding method :
    http://www.servlets.com/cos/index.html
    However,in Servlet 2.3 (e.g Tomcat 4), a new method on the HttpServletRequest object was added in order to be able to specify the request's parameters charset encoding:
      // Set the charset as Shift_JIS
      req.setCharacterEncoding("Shift_JIS");
      // Read a parameter using that charset
      String name = req.getParameter("name");The setCharacterEncoding call may throw java.io.UnsupportedEncodingException if the encoding is not supported.

  • How can i change the default text "Query by Example"

    Studio Edition Version 11.1.1.3.0
    how can i change the default text *"Query by Example"* in a Panel Collection
    Thx

    Hi thieto,
    The label you are looking for is af_panelCollection.LABEL_MENUITEM_QBE*
    I'm currently writing a blogpost on this issue. In short, you will have to create a skin resource bundle.
    In the skin definition, refer to this bundle class.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <skins xmlns="http://myfaces.apache.org/trinidad/skin">
      <skin>
        <id>mySkin.desktop</id>
        <family>MySkin</family>
        <extends>blafplus-rich.desktop</extends>
        <render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id>
        <style-sheet-name>skins/MySkin.css</style-sheet-name>
        <bundle-name>com.blogspot.lucbors.view.bundles.MySkinBundle </bundle-name>
      </skin>
    </skins>In this class, adjust the label text to your needs.
    package com.blogspot.lucbors.view.bundles;
    import java.util.ListResourceBundle;
    public class MySkinBundle extends ListResourceBundle {
      public MySkinBundle() {
        super();
    @Override
      public Object[][] getContents() {
        return _CONTENTS;
    static private final Object[][] _CONTENTS = {
         {"af_panelCollection.LABEL_MENUITEM_QBE","the text that you want"}
    }More in the blogpost
    Good luck
    Luc Bors
    Edited by: lucbors on Jul 26, 2010 11:39 AM (blogpost finished - URL added)

  • Mail Text Encoding Options Missing

    For some reason, the Message -> Text Encoding pull-down menu in my Mail has only one option -- "Automatic". All other options are missing. Thus I am here seeking for help.
    All the information I've found told me that I should go to the International Pref Pane, choose Language, click the Edit List button and choose the languages I want. I did so, and there are indeed several languages in the list. Still, the pull-down menu in Mail shows no options at all, only "Automatic".
    Does anyone know what went wrong? Is some file corrupted in some way?
    Thanks!

    I deleted com.apple.mail.plist (in fact I it them to another location so I can restore it in case things go wrong) and re-launched Mail. This time I got all the menu options that should be there. I had to re-create all the mail accounts, but the saved emails were not lost.
    Problem solved! Thanks!

  • How to change the default text title of Detached table/treetable

    Hi,
    Is anybody know How to change the default text title of Detached table/treetable.
    I have already read the post on "http://vtkrishn.com/2010/07/28/how-to-change-the-default-text-title-of-detached-tabletreetable/"
    as per this post It will change the title throughout the application.
    I wanted to change only for one particular table.
    Thanks,
    Charu
    Edited by: Charu on Sep 13, 2012 4:14 AM

    Hi,
    please don't double post and instead continue with your original threat. In the previous post you got the correct answer to use skinning. You did not like the solution as it doesn't allow per-instance titles. I agree with this and a logical consequence is to file an enhancement request instead of re-posting the question. I'll file the ER, so no need to follow up for you anymore
    Frank

  • How to change the default text style?

    The MacOS system seems to maintain a collection of text 'styles' available in applications such as TextEdit, Bean, MacJournal, Notebook and DevonThink. This collection contains a default style, used by some (but not all) of these applications as the default text style for new documents.
    At my computers this default style is characterized in the 'favorite styles' panel as 'left aligned, spacing 0.0x' and it has strange tab stops (0.99, 1.98, 2.96, 3.95, 4.94, 5.93, 6.91, 7.90, 8.89, 9.89, 10.86, 11.85 cm).
    I prefer tab stops at 1.00, 2.00, 3.00 etc., and 1.2x line spacing.
    I guess I have changed the default style by accident, as I cannot imagine Apple putting such strange tab stops in a default style (0.0x spacing sounds a bit strange too). If so, it must somehow be possible to change the default style.
    I have tried to change the default style via TextEdit (which does not use the default style as default, but spacing 1.0x and tab stop at each centimeter) and several other applications (Bean, MacJournal, Notebook) in the following way: select a piece of text with the intended format, open the document styles panel, click 'Add to Favorites', enter 'Default' as the name for the style and click 'Replace'. Unfortunately, that doesn't work. Although I do not get an error message, the Default style hasn't changed. I can save my preferred style as, for example, 'Preferred' but that does not prevent MacJournal and other applications from using Default for every new document.
    Any idea how to change this default style, or, if that is not possible, reset it to its original state?

    I suggest you have a look at [https://addons.mozilla.org/en-US/thunderbird/addon/stationery/?src=api Stationery].
    It won't help you in defining styles, as such, but will give you templates wherein you can set up styles.

  • How to change the default save encoding of the dvm files when create dvm???

    When I creating a DVM(domain-value mapping) in Chinese on the ESB control and confirm it, then restarted the SOA service, the DVM that I created in Chinese disappeared from ESB control. All the maps(both English and Chinese ) are in DVM Repository.
    After I updated the encoding from ‘UTF-8’ to ‘GB2312’ in the three files below, and restarted the SOA service, the DVM in Chinese appeared on ESB control.
    But when I adding the second row in Chinese and save it, then restart the SOA service, the DVM in Chinese disappeared from ESB Control once again. Because the encoding in the three files below is updated from ‘GB2312’ to ‘UTF-8’ .
    Files:
    C:\product\10.1.3.1\OracleAS_1\integration\esb\oraesb\artifacts\store\metadata\files\dvm.def.xml
    C:\product\10.1.3.1\OracleAS_1\integration\esb\oraesb\artifacts\store\metadata\files\dvm\Chinese.xml.def.xml
    C:\product\10.1.3.1\OracleAS_1\integration\esb\oraesb\artifacts\store\content\files\dvm\Chinese.xml_1.0
    How to change the default save encoding of the dvm files when create dvm in ESB control ???

    I have the same problem.  When I updated to Mavericks now the bookmarks bar font is huge.  I liked it the way it was before.  I liked the smaller font.  Also wish I could change the color of the sidebar and font/folders too.
    I tried to see in preferences if there was anyway to change it, but I don't see anything there.

Maybe you are looking for