I have a simple string with Chinese characters in my Android application and want to replace one character with another…
As a sample, I have this code:
String old_string = "啤酒";
String new_string = old_string.replaceAll("一", "啤");
Log.d(TAG, "transformed "+old_string+" into "+new_string);
This will not do anything:
transformed 啤酒 into 啤酒
Also tried with replace instead of replaceAll without any luck.
Try swapping the values around: