Java ASCII to Unicode ASCII2Unicode(String ascii)

Here you can find the source of ASCII2Unicode(String ascii)

Description

ASCII Unicode

License

Apache License

Declaration

public static String ASCII2Unicode(String ascii) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static String ASCII2Unicode(String ascii) {

        StringBuffer unicode = new StringBuffer(ascii);

        int code;

        for (int i = 0; i < ascii.length(); i++) {

            code = (int) ascii.charAt(i);

            if ((0xA1 <= code) && (code <= 0xFB)) {
                unicode.setCharAt(i, (char) (code + 0xD60));
            }//  w ww . jav  a2 s.c o m

        }

        return unicode.toString();

    }
}

Related

  1. ascii(String name)
  2. asciiToUnicode(String theString)