Special icon characters 💊 in Android Studio - xcode

In xcode it's possible to have characters like "💊" in code. If I paste it to Android Studio it shows me another 2 unicode characters, which don't have anything in common with "💊".
Both editors use UTF-8 encoding AFAIK.
So where is the difference?

Android Studio uses windows-1252 as default and you can use the unicode equivalent:
\uD83D\uDC8A
for example using a TextView:
myTextView.setText("\uD83D\uDC8A");
will create something like (in my device two pills are showed):
Here you can find the equivalent "Java Escape" code :
http://www.charbase.com/1f48a-unicode-pill

Related

VS Code can't read unicode language written in other editors

I'm trying to use VS Code but I'm having a problem opening code written with other editors, VS Code can't read korean language unicode? utf-8? what we call other languages in code?
I wrote the code with vim editor with some comment written in korean, and any other editors can read korean languagee but VS Code like following.
ret.insert(ret.end(), bottom.begin(), bottom.end()); // written in vim
// 는 다음과 같음
ret.insert(ret.end(), bottom.begin(), bottom.end()); // opened in VS Code
// �� ������ ����
How can I fix this problem?
Make sure your VSCode is opening the file with UTF8 encoding.
Change the encoding of a file in Visual Studio Code

Do all Windows fonts express extended ASCII in the same way?

In my Visual Studio 2012 application, I just wrote the following:
_snprintf_s(page[row++], NUM_COLS, _TRUNCATE, " Lat: %-11s (\x0b1 %3.1fm)",
lat_string, lat_precision_meters);
The \xb1 is the escape code for the "+/-" symbol, 177 in extended ASCII, ISO 8859.
I read that this was originally a Windows feature with some other name.
This works for me - it shows the correct symbol next to the precision, in my default font.
My question is: have I just introduced an issue for users who override the default font? Are all Microsoft-provisioned fonts ISO 8859-1 compliant?

Displaying Arabic characters in VSFlexgrid

I have a VB 6.0 application in which one of the windows needs to display Arabic characters. When it used VSFlexgrid 7 it worked fine, but since upgrading to VSFlexgrid 8 it displays question marks and other "junk" characters. I have references to vsflex8.ocx, vsflex8l.ocx, vsflex8n.ocx and vsflex8u.ocx in the project. Is there something else I need to download, or a setting I need to set somewhere?

UI XCTest recording with unicode characters in XCode 7 gives wrong Swift code

Right now when recording an element on my app, it returns something along the lines of:
XCUIApplication().alerts["\U201cMy Application\U201d Would Like to Send You Notifications"].staticTexts["Notifications may include alerts, sounds, and icon badges. These can be configured in Settings."].tap()
Which throws a compiler error. I then changed it to this, to follow the swift convention on references unicode characters:
XCUIApplication().alerts["\u{201c}My Application\u{201d} Would Like to Send You Notifications"].staticTexts["Notifications may include alerts, sounds, and icon badges. These can be configured in Settings."].tap()
This does compile, but the test fails because Swift does not find the element when testing. I then tried this:
XCUIApplication().alerts["“My Application” Would Like to Send You Notifications"].staticTexts["Notifications may include alerts, sounds, and icon badges. These can be configured in Settings."].tap()
Which has the same result.
I realize that this is likely a bug with xcode, but is there a workaround? The issue seems to have been around for awhile.
I can't reproduce your error. Using the swift convention \u{201c}works great. U can also try using just a backslash if you want to use quotation marks
"\"MyApp\" Would Like to Send You Notifications"
You message indicates that you want to react to a system notification rather than your own UIAlert. Thats why you can't find it. Try setting up an UI Interuption Alert before the Alert appears and then react to it:
addUIInterruptionMonitorWithDescription("\"MyApp\" Would Like to Send You Notifications") {
(alert) -> Bool in
alert.buttons["OK"].tap()
return true
}
Also consider Joe Masilotti's excellent Cheat Sheet for further information.
Workaround for Xcode 7.1 bug in UI XCTest recording unicode titles (Swift)
Record all actions you want as usual.
Copy generated code
Open this online unicode converter tool
Paste your code in "Unicode characters*" text area
Select conversion direction: Unicode characters to unicode escape sequences
Click Convert button
Copy converted code from "Unicode escape sequences" text area in your program
That all. I hope Apple will fix this bug soon.
I faced the same problem and I fixed it with this code below:
let notificationAlertElement = XCUIApplication().alerts["\u{201c}My Application\u{201d} Would Like to Send You Notifications"].staticTexts["Notifications may include alerts, sounds, and icon badges. These can be configured in Settings."].collectionViews.buttons["OK"]
if (notificationAlertElement.exists) {
notificationAlertElement.tap()
}
I can't get "addUIInterruptionMonitorWithDescription" working. So, the solution I use is to not register for notification if in simulator.
//Because simulator does not have to have notifications, ust disable it.
#if !arch(i386) && !arch(x86_64)
//Ask the user to accept notifications from the application
application.registerUserNotificationSettings(UIUserNotificationSettings(forTypes: UIUserNotificationType.Alert, categories: nil))
#endif

Aptana problems - not show/read interrogation point "?" / encoding issues

I just downloaded Aptana 3 built 3.61.201410201044 and i'm experiencing an issue:
Everytime i try to type the question mark "?" aptana enable/ disable "Show whitespace characters" option
I tried using both Shift+/ and AltGr+w and it didn't work
Even if i copy/paste a text that use the character, it doesn't work on my method when running.
I'm on Windows 7; my keyboard is PT-Br and all the encodings (default and each file) are set to UTF-8
I don't know what to do, as i need this symbol to use many methods in Ruby...
I googled this issue for a long time before asking here, and just read about setting the encoding to utf-8 but i did it and didn't work.
Please help
Well, after many tries i found how to solve it. I'll post here just in case somebody else need:
Go to
Preferences> General> Keys
then search for "Show whitespace characters" and delet the binding (keys shortcut / hotkeys)

Resources