I have a wifi AP with an SSID that's a string of unicode characters (ex: "ԱԲԳԴԵԶԷԸԹԺԻԼ") that I want my Android device to connect to. When my device (Nexus One) detects the hotspot, the SSID looks like this: "܍܍܍܍܍܍܍܍" and does not recognize it. Any idea how to fix this?
-
use a-z for your SSID, unicode can cause all sorts of problems. – zapl Mar 22 '12 at 22:34
-
2@zapl it's not unicode that causes "all sorts of problems" but the lack of support for it on some devices - because it's simpler and cheaper for the makers not to support it. – Rolf Jan 13 '16 at 18:09
-
1@Rolf still means that Unicode is a bad idea in ssids – zapl Jan 13 '16 at 22:17
2 Answers
The SSID field in a 802.11 packet has 32 bytes. I believe that Android devices (as well as other devices) choose to interpret each byte as an individual character (this is probably also part of the 802.11 standard). This is why SSIDs are limited to 32 characters.
Now since we only use a single byte to represent each character, we only have 8 bits to use. Using a two's complement system (probably used) the highest number we can represent is 127 (2 ^ (8-1)).
Standard ASCII characters can be represented with a single byte, each corresponding to a decimal value between 0 and 127. Unicode characters on the other hand, require anywhere from 1 to 4 bytes to represent. Thus if the 802.11 specification was modified to include 4 byte Unicode characters in the SSID field, you'd only be able to use a maximum of 8 characters in your SSID. I guess somewhere along the line someone decided to favour 32 characters from a smaller pool, over 8 characters from a larger pool.
You could possibly get around this by writing a custom driver on the device to interpret the 32 byte SSID field as Unicode characters, but I wouldn't recommend it.
As mentioned in the comments, Unicode characters can be encoded as UTF-8 so my earlier answer is not valid.

- 41
- 3
-
"you'd only be able to use a maximum of 8 characters in your SSID" - nope up to 32. Remember 1-4 bytes are used - and for oriental languages usually just 2 – Mr_and_Mrs_D Nov 29 '13 at 02:16
-
also the spec allows it : http://standards.ieee.org/getieee802/download/802.11-2012.pdf – Mr_and_Mrs_D Nov 29 '13 at 02:17
-
Note that it is possible to store Unicode characters in an array of bytes if the Unicode is encoded in UTF-8. So the answer above is not really valid. – Oct 25 '12 at 22:13
-
Wait, do I understand this correctly? It's actually **bytes**? So, a SSID with byte values that are non-printable (line breaks, tabs, and NUL bytes included) is a valid SSID per the specification? I'm so tempted to do that... – Damon Apr 24 '20 at 21:50
I've wrote an app "WiFi Connection Manager" to fix this problem. However, I don't understand any Armenian, so that the result may not be displayed correctly. You can still connect to the Access Point even if the names are displayed incorrectly with my app.
You may find it in the Android Market.
Or you can download it here.

- 6,230
- 12
- 66
- 88

- 21
- 1
-
Awesome! How did you overcome the special character issue? I'm trying to use unicode characters as a representation for an underlying bit sequence, so I have to be able to incorporate this into my own app. (It's for my master's project – I promise I'm not making a competitor to your app, haha.) – Ben Mar 24 '12 at 19:52
-
1You need to deal directly with the wifi service to get the raw scan result. The results are different from devices and drivers. If you only need it to work on one device, it wouldn't take much time. – roamingsoft Mar 26 '12 at 07:29
-
I am asking exactly how and offering a bounty for it here: http://stackoverflow.com/questions/20277425/non-ascii-ssids-in-android – Mr_and_Mrs_D Mar 26 '14 at 13:53