<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=206822&amp;view=findpost&amp;p=1737751</guid>
        <pubDate>Mon, 22 Oct 2007 06:42:39 +0000</pubDate>
        <title>Кодировка в j2me</title>
        <link>https://forum.sources.ru/index.php?showtopic=206822&amp;view=findpost&amp;p=1737751</link>
        <description><![CDATA[Alex_ru: <strong class='tag-b'>Dancer</strong><br>
я пишу *.ini файл, мне надо, что бы это был нормальный файл, а не с размером в первых байтах :)]]></description>
        <author>Alex_ru</author>
        <category>Java</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=206822&amp;view=findpost&amp;p=1734555</guid>
        <pubDate>Thu, 18 Oct 2007 15:51:29 +0000</pubDate>
        <title>Кодировка в j2me</title>
        <link>https://forum.sources.ru/index.php?showtopic=206822&amp;view=findpost&amp;p=1734555</link>
        <description><![CDATA[Dancer: пишет размер &quot;writeUTF()&quot; если уж на то пошло....<br>
и если записали через writeUTF(), то через readUTF() будет всё нормально прочитано. зачем изобретать велосипед? (побайтно что-то читать... и т.д.) <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2007-10-18T15:59:47+00:00">18.10.07, 15:59</time></span></span><br>
<a class='tag-url' href='http://forum.sources.ru/index.php?showtopic=190715&st=0&#entry1603708' target='_blank'>Как записать строку в формате utf-8 в фаил</a>]]></description>
        <author>Dancer</author>
        <category>Java</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=206822&amp;view=findpost&amp;p=1733624</guid>
        <pubDate>Thu, 18 Oct 2007 08:29:30 +0000</pubDate>
        <title>Кодировка в j2me</title>
        <link>https://forum.sources.ru/index.php?showtopic=206822&amp;view=findpost&amp;p=1733624</link>
        <description><![CDATA[Malkav: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>readUTF()<br>
этот метод в начале пишет свой размер, а мне это не катит.</div></div><br>
Пишет размер? Первый раз слышу. Но я правда особо глубоко не копал в этом направлении, просто когда я узнал об этой корявости с кодировками в J2ME я стал работать только с чистами байтами без всяких переводов туда-сюда :)<br>
Т.е. возвращает нормально, но спереди точит размер? Так прибей эти байты с размером ;)]]></description>
        <author>Malkav</author>
        <category>Java</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=206822&amp;view=findpost&amp;p=1733591</guid>
        <pubDate>Thu, 18 Oct 2007 08:15:29 +0000</pubDate>
        <title>Кодировка в j2me</title>
        <link>https://forum.sources.ru/index.php?showtopic=206822&amp;view=findpost&amp;p=1733591</link>
        <description><![CDATA[Alex_ru: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=206822&view=findpost&p=1732846'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Malkav &#064; <time class="tag-quote__quoted-time" datetime="2007-10-17T14:24:31+00:00">17.10.07, 14:24</time></span><div class='quote '>readUTF()</div></div><br>
этот метод в начале пишет свой размер, а мне это не катит.<br>
<br>
<div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=206822&view=findpost&p=1732846'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Malkav &#064; <time class="tag-quote__quoted-time" datetime="2007-10-17T14:24:31+00:00">17.10.07, 14:24</time></span><div class='quote '>GetBytes(String enc) </div></div><br>
<br>
пробовал, не помогло :(<br>
<br>
<br>
Вот пример как я считываю файл:<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">DataInputStream dis = fc.openDataInputStream();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;int num=(int)fc.fileSize();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;String fileInfo=&quot;&quot;;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;byte b[]=new byte[num];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;dis.readFully(b);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;for (int i=0;i&#60;fc.fileSize();i++)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;try{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;char tt=(char)b[i];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fileInfo+=tt;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} catch(Exception ee){}</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
<br>
собственно записать я записываю нормально, а вот читать оно оттуда не хочет по людски :(]]></description>
        <author>Alex_ru</author>
        <category>Java</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=206822&amp;view=findpost&amp;p=1732846</guid>
        <pubDate>Wed, 17 Oct 2007 14:24:31 +0000</pubDate>
        <title>Кодировка в j2me</title>
        <link>https://forum.sources.ru/index.php?showtopic=206822&amp;view=findpost&amp;p=1732846</link>
        <description><![CDATA[Malkav: Используй DataInputStream, у него есть прекрасный метод readUTF(), либо используй InputStreamReader(InputStream is,String enc),<br>
еще можно пользовать GetBytes(String enc), где enc- кодировка.<br>
В телефонах, как правило, используется именно UTF-8.<br>
Также пользуйся Великим Гуглом и <a class='tag-url' href='http://forum.sources.ru/index.php?showtopic=201008' target='_blank'>Поиском</a>]]></description>
        <author>Malkav</author>
        <category>Java</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=206822&amp;view=findpost&amp;p=1732320</guid>
        <pubDate>Wed, 17 Oct 2007 08:21:01 +0000</pubDate>
        <title>Кодировка в j2me</title>
        <link>https://forum.sources.ru/index.php?showtopic=206822&amp;view=findpost&amp;p=1732320</link>
        <description><![CDATA[Alex_ru: Записать в файл удается нормально, но вот с чтением происходит ошибка - символы не те, что должны быть (кроказяблики разные).]]></description>
        <author>Alex_ru</author>
        <category>Java</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=206822&amp;view=findpost&amp;p=1731641</guid>
        <pubDate>Tue, 16 Oct 2007 14:46:46 +0000</pubDate>
        <title>Кодировка в j2me</title>
        <link>https://forum.sources.ru/index.php?showtopic=206822&amp;view=findpost&amp;p=1731641</link>
        <description><![CDATA[Alex_ru: Хочу записать в файл русский текст, а потом его оттуда прочитать. Что то не очень хорошо выходит. Пишу в UTF-8 или Cp1251, но результат одинаков.]]></description>
        <author>Alex_ru</author>
        <category>Java</category>
      </item>
	
      </channel>
      </rss>
	