Reputation: 76536
Since AVD tools 16 I'm getting this warning:
Replace "..." with ellipsis character (..., …) ?
in my strings.xml
at this line
<string name="searching">Searching...</string>
How do I replace ...
? Is it just literally …
?
Could someone explain this encoding?
Upvotes: 324
Views: 103295
Reputation: 572
Best not to ignore it as suggested by some, it seems to me. Use Android Studio to correct it (rather than actually typing in the character code), and the tool will replace the three dots with the three-dot unicode character. Won't be confusing to translators etc.
Upvotes: 1
Reputation: 1569
The quick fix shortcut in Android Studio is Alt
+ Enter
by default.
Upvotes: 3
Reputation: 12745
If you're using Eclipse then you can always do the following:
This should replace your three dots with the proper Unicode character for ellipsis.
Just a note: The latest version of ADT (21.1) sometimes won't do the replace operation properly, but earlier versions had no problem doing this.
This is the character: …
Upvotes: 13
Reputation: 57682
…
is the unicode for "…" so just replace it. It's better to have it as one char/symbol than three dots.
Upvotes: 558
Reputation: 864
This answer is indirectly related to this question:
In my case textView1.setTextView("done…");
was showing some box/chinese character. Later, I checked into fileformat.info
for what the value represents and I found this is a Han character.
So, what to do? I searched for "fileformat.info ellipse character" and then everything became clear to me once I saw its values are;
UTF-16 (hex) 0x2026 (2026)
UTF-16 (decimal) 8,230
So, you have several encoding available to represent a character (e.g. 10 in Decimal is represented as A in hexa) so it is very important to know when you are writing an unicode character, how receiving function decodes it. If it decodes as decimal value then you have to provide decimal value, if it accept hexadecimal then you have to provide hexadecimal.
In my case, setTextView() function accepts decimal encoded value but I was providing hexadecimal values so I was getting wrong character.
Upvotes: 3
Reputation: 129
The solution to your problem is:
Go to Window -> Preferences -> Android -> Lint Error Checking
And search for "ellipsis". Change the warning level to "Info" or "Ignore".
Upvotes: 8
Reputation: 4329
To make thing short just put …
in place ...
Link to XML character Entities List
Upvotes: 16