I have ÷ in .txt file in my android. When this division symbol is shown on android device, I see "�"
To make it worse, my laptop doesn't have division sign on keyboard. I used the above sign from wikipedia.
Any guess how can I resolve this.
I have ÷ in .txt file in my android. When this division symbol is shown on android device, I see "�"
To make it worse, my laptop doesn't have division sign on keyboard. I used the above sign from wikipedia.
Any guess how can I resolve this.
You should use the Unicode value for any symbols such as the division symbol you have here.
Try the Unicode U00F7.
When using it within a String format like "\u00F7"
.
The problem is most likely a font issue, or possibly a unicode encoding issue. The character you pasted is unicode codepoint 0xF7: if the font being used to display your text file does not have a specific glyph for this codepoint, then it will render it using some reserved glyph like the question mark diamond you show. The solution in this case would be to install and use a font which includes an appropriate glyph for this codepoint. For instance, if it is displayed correctly in your web browser, then find out what font your browser is using, and try that. Of course, whether or not you can change the font used to display your text file depends on the application (at least I think: I don't think Android fixes the font across all apps).
Alternatively, it could be an encoding problem. For instance, if you're saving your text file in Latin-1 encoding, then this character will be stored in a single byte with value 0xF7. If the app that you're viewing the file with is assuming it's UTF-8, for instance, then this byte will be interpreted as the first of a multi-byte character, or it may even be invalid. If this is the case, you just need to make sure the encoding you use to save the file is the same as the one being used to display the file. Again, this would be application specific.