Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

hmemcpy

macrumors newbie
Original poster
Jun 3, 2011
4
0
Hey, new to programming...

When in XCode I'm running into a problem.

Window based App.

With classes folder selected I go to file/new / UIView / Objective-C class

But, both files that are created have only gibberish for text, as viewed in the coding section of Xcode. Also, if I drag and drop the newly created .h and .m files from the classes folder into a ASCII text editor, their fine, no gibberish.


Anyone seen this?


hem
 
Last edited:
Right click on file, Get info, check File Encoding
open shell and compare with output of
Code:
file <name of file>
 
hummm.....

Are you saying you think this could be a shell script?

It's not!, what i see on the screen is complete gibberish, not a script.

So I need to have web storage to show you all a pic? I don't have a web site, so how can I stick a pic up so you can see this gibberish?

Thanks,



hem
 
So I need to have web storage to show you all a pic? I don't have a web site, so how can I stick a pic up so you can see this gibberish?

You can attach pictures to posts. MacRumors hosts them. Look in the Additional Options box when you reply: the Manage Attachments opens a new window that you can use to upload pictures. Take note of the max file sizes though...
 
pic

here is the gibberish....

Has anyone seen this?
 

Attachments

  • Screen shot gibb.png
    Screen shot gibb.png
    128.2 KB · Views: 174
That's an encoding problem for sure.

Skipping the inverted question marks, what's left looks like normal text. This suggests the inverted question marks are 0x00 bytes, which would be the high byte of a Unicode UTF-16-BE or UTF-16-LE encoding. The two other characters before the first / are probably the byte-order mark (BOM).

So somewhere or other, Xcode was probably told to use UTF-16.
 
Got it... FIXED

Thanks All, you guys were all over this!

The fix was Xcode/preferences/Text Editing/Default File Encoding:
was set to UTF - 16 I just set it to UTF -8 and BANG! was fixed.


Thanks again,



hem
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.