Removing Unicode character in Xcode - xcode

I often use OneNote for sample/template code which I can refer for any project. But When I copy from OneNote to Xcode I get below warning "Treating Unicode character as whitespace".
Though this is just a warning I like to see my code editor window warnings free. Is there any way to replace these Unicode character?

That happens to me, even converting the unicode text format didn't resolve this issue.
For a (hacky) solution, paste your code in apple-mail new message first, then copy and paste to Xcode, will correct this issue.

Related

How to show ascii non-printable characters in Visual Studio Code?

I'm using Visual Studio Code version 1.51.1 and am wondering if there is any way to display all of the ascii non-printable characters when looking at a file. I used to use Notepad++ and it had a feature you could turn on that would show every character in a file including non-printable characters.
For example, here's a screenshot from a file open in Notepad++ that I've inserted the non-printable BEL character in by pressing ALT + 007. You can also see the carriage-return/line feeds at the end of the line:
Here's a list of the characters I'm referring to (I found this list here):
So what I'm asking is there an extension I can install into Visual Studio Code or a setting that I can configure that will show all ascii characters, both printable and non-printable, similar to how Notepad++ does it as shown in the screenshot I provided? Thanks in advance.
On the bottom-right corner of the status bar, you will see the encoding of the file. Click and select “Reopen with Encoding…” and change to something like UTF-8 or higher.
You can also search for the “Change File Encoding” task via Cmd+Shift+P.

Visual Studio displaying UTF-8 (without BOM) as ISO 8859-1 (characters all messed up)

I have no clue what happened, and i uninstalled pretty much everything on my PC and reinstalled VS 2015, but UTF-8 files (without BOM) display all messed up in VS now, as before they would work just fine.
If i save the file WITH BOM, all is well ..but that's not the goal.
If i open the file in another editor, it displays that the file is very well a UTF-8 file, and the content displays fine ..only VS is messed up.
Even fixing the characters and then doing the usual save-as, and choosing utf-8 without bom, only works as long as i don't close/reopen VS ..once i do, it's all messed up again.
It seems like everytime VS opens a file thats in UTF-8 (without BOM), VS opens it as if it where in 8859-1
Any ideas anyone ? Thanks !
Visual Studio:
Notepad++
After lots of pains, reinstalls, etc, i finally figuerd it out.
I really don't remember having to have to check this in the past, but apparently you have to tell VS to autodetect utf-8 files without signature:
Not sure if this was checked in the past, is some install unchecked it, or whatever ..in any case this fixes the issue.

Visual Studio shows syntax error after notepad++ edit .py file

Endcoding is utf-8 without BOM.
Actually I tried every encoding, but it doesn't solve problem. I don't know whats wrong.
How can I fix it?
Thanks
This is inconsistent whitespace type of thing. At Notepad++ Settings->Preferences>Tab Settings check "Replace by space". The problem fixed. Now I enjoy Notepad++.

Chinese characters showing as blank boxes in strings.xml

I am trying to cut and paste traditional Chinese characters as alternative resources in my values-zh-rTW/strings.xml file. They show as blank white boxes. As far as I can find, every encoding option is set to UTF-8. If it is a font issue, I'm not sure where to change the font or which font to change. I did go to General>Appearance>Colors and Fonts, but I'm not sure which font to adjust, if any. Please help if you've dealt with this before.
You might take a look at this question to make sure you're doing everything mentioned here:
How to support UTF-8 encoding in Eclipse
Here's another question that may have what you need:
How to print [Simplified] Chinese characters to Eclipse console?
I had the same problem and the solution was to install "East Asian Languages" in windows. Just go to control panel, Regional and Language Options, Languages tab, and then check Install files for East Asian languages (it required a windows cd for me).
There are some chinese characters in my eclipse editor. And it's not displayed correctly.
I change the project's text file coding by Cmd + I to show the project's Properties setting dialog. then in in put GBK in Text file encoding. then Apply it. the characters displayed correctly.
The screenshot is as below:

Hide linefeed and tab characters in xcode editor

As can be seen in the screenshot the editor in xcode has started to show linefeeds and tab characters, normally invisible characters. I can't for the life of me find a way to hide them again and i have no idea why they started to show. Any ideas?
Solved it, it was the bracket matching xcode plugin that caused it. Removing that restored order in the universe and xcode.

Resources