Форум администраторов игровых серверов

Форум администраторов игровых серверов (https://forum.zone-game.info/TT.php)
-   Java (https://forum.zone-game.info/forumdisplay.php?f=126)
-   -   Java Unicode (https://forum.zone-game.info/showthread.php?t=42451)

Boris2105 09.08.2017 23:45

Java Unicode
 
У меня возник вопрос как реализовать юникод
Чтобы было на подобие , дабы использовать на сервере.
Код:

protected final void writeS(String text)
    {
        if (text == null)
        {
            text = "";
        }
        try
        {
            writeB(text.getBytes("UTF-8"));
        } catch (UnsupportedEncodingException e)
        {
            e.printStackTrace();
        }
    }


klubheads 10.08.2017 02:09

Re: Java Unicode
 
Можно сразу скомпилировать ядро c UTF-8

<target name="compile" depends="init" description="Compile the source.">
<javac destdir="${build.classes}" optimize="on" debug="on" nowarn="off" source="1.7" target="1.7" includeantruntime="false">
<compilerarg value="-encoding"/>
<compilerarg value="UTF8"/>
<src path="${src}"/>
<bootclasspath refid="bootclasspath"/>
<classpath refid="classpath"/>
</javac>
</target>


Текущее время: 09:11. Часовой пояс GMT +3.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd. Перевод: zCarot