UTF-8 to Java-code converter

This page can convert any UTF-8 string to normal Java code that can be used and stored as ASCII-based Java source. For example, the Java string "c = 2\u2219\u03c0\u2219r" will be displayed as "c = 2∙π∙r". This page helps you convert those UTF-8 characters to ASCII-based Java-code.

UTF-8 input

Type in some UTF-8 text and press the [Submit] button:

How can I do this myself using Java?

Here's the Java source code for UTF-8 to java code conversion.