• Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About rocketsvm

  • Rank
  1. mr sharpoblunto Sorry, I have been busy too. Here's the modified utf8 handling code: public static String UTF8Decode(String in) { StringBuffer buff = new StringBuffer(); char c; for (int i = 0; i < in.length(); i++) { if (in.charAt(i) < 192) { buff.append(in.charAt(i)); } else { c = 0; if ((byte)in.charAt(i) < 224) { c |= (((byte)in.charAt(i) & 0x1f) << 6); i++; c |= (((byte)in.charAt(i) & 0x3f) << 0); } else if (in.charAt(i) < 240) { c |= (((byte)in.charAt(i) & 0x0f) << 12); i++; c |= (((byte)in.charAt(i) & 0x3f) << 6); i++; c |= (((byte)in.charAt(i) & 0x3f) << 0); } else if (in.charAt(i) < 248) { c |= (((byte)in.charAt(i) & 0x07) << 18); i++; c |= (((byte)in.charAt(i) & 0x3f) << 12); i++; c |= (((byte)in.charAt(i) & 0x3f) << 6); i++; c |= (((byte)in.charAt(i) & 0x3f) << 0); // } else if (in.charAt(i) < 252) { // just won't mess with that } else { c = '?'; } buff.append((char)c); } } return buff.toString(); } Note that it doesn't need int offset, int length parameters. This one works for me, russian letters displayed fine. BTW Thanks for the update. I tried to implement the features I requested, with partial success, but here they are from the official source! edit: P.S. Yeah, I did set up Eclipse.
  2. mr sharpoblunto, check your e-mail. I sent it through a form on this site. edit: @mr sharpoblunto I received no response from you yet, so I'll just post here. 1) Cyrillic letters are still not displayed in 1.4. I forgot that I changed UTF8Decode function before I successfully tested it. I'll post my version later. 2) I used Java ME Platform SDK 3 to perform experiments on your code, but I'll try to set up Eclipse dev environment today so we could work in the same software for better synchronization.
  3. Thanks for the update, mr sharpoblunto, I'll test is ASAP. Also I have an idea about wrapping long lines of text in the list. By default JVM in my Motorola A1200 acts the same way as in your device - wraps long lines in List. And the same way it is in emulator I use. But I tried to do _torrentList.setFitPolicy(2); right after creating _torrentList. This command makes at least emulator cut long lines just like in the screenshot sndr posted. Now I'm going to try it in a real device and see what happens. Info from the Java SDK for the reference: TEXT_WRAP_DEFAULT 0 TEXT_WRAP_OFF 2 TEXT_WRAP_ON 1 Edit: Ok, I tried setFitPolicy on my A1200, and it kind of works: no more wrapped lines, but a horizontal scrollbar, so I can see the whole line when I scroll. I guess that it should work in both ways, i.e. if you setFitPolicy(1), it will force wrapping on devices without it by default. May be you could do this as an option, because I personally find fixed-height items more comfortable. Also, there was a report about empty password not working. May be this is the reason: if (UserData.getInstance().getUserName().equals("") || UserData.getInstance().getPassword().equals("") || UserData.getInstance().getServerAddress().equals("")) { initialScreen = ViewFactory.createSettingsView(this); } Well, setting no password for webui is not a good idea anyway... And back to the wish list: 1) An option for not doing the update of the list, when we go back from the torrent details view? It produces lags on my connection, and selection is always reset to the first item. 2) Display ETA in torrent list. May be only for torrents with "Downloading" status.
  4. Hello, everyone! First of all, thank you, mr sharpoblunto, for your work on this nice tool, it's really unreplaceable for me. There was a report a while ago about cyrillic letters not displaying correctly. I was totally new to J2ME development, but I did some research on that problem. The thing is J2ME does not support UTF-8, so we have to convert uTorrent's output to UTF-16. Here's what I've found: I managed to compile your sources (separate thanks for sharing) with a little change in getString function in, tested this and it worked. Hope you'll add this fix in the next version.