Search code examples
androidprintingbluetooththermal-printer

Print Indian rupee symbol (₹)


I am using an OVIO Bluetooth thermal printer. I want to print the Indian Rupee symbol (). When i append the symbol to string and send the string to be printed, everything is printed fine other than the symbol. A "?" symbol is printed instead of "". I have set charset encoding to UTF-8.

You can find the printer manual from THIS LINK. In the manual, on Page 11, there is an option to define user-defined character but don't know how that can be achieved.

String msg="₹"+"1,000.00"; outputStream.write(msg.getBytes("UTF-8"));


Solution

  • You have to use unicode character. In Java it's used like

    String msg = Html.fromHtml("\u20B9 1,000.00")