musikCube Logo
musikCube community wiki

You are not logged in.

Announcement

mC2 :)

#1 2005-04-10 07:25:48

Guest
Guest

Cyrillic support

Please, add support for cyrillic symbols. Cause russian letters don't display right. sad  ( i have enabled russian support for non-unicode in control panel) everything works perfectly in winamp.
[img=http://img28.exs.cx/img28/4800/screen0qv.th.jpg]

 

#2 2005-04-10 08:55:24

avatar3d
mC Project Manager
Registered: 2005-02-13
Posts: 641

Re: Cyrillic support

We're currently working on a way to display non-unicode cyrillic tags.  If the tag is real UTF8 it will display properly.


Casey Langen
Project Manager
http://www.musikcube.com

Offline

 

#3 2005-08-22 18:21:01

grig
Guest

Re: Cyrillic support

There is a problem or a bug with a windows port of taglib, it does not properly convert unicode characters to non-unicode, but it can be easily fix by adding the following code to the tstring.cpp:

namespace TagLib {
  ...
  wchar_t toWideChar(const char c) {
   wchar_t wc;

    MultiByteToWideChar(CP_ACP, 0, &c, 1, &wc, 1);
    return wc;
  }

  char toAnsiChar(const wchar_t wc) {
   char c;

    WideCharToMultiByte(CP_ACP, 0, &wc, 1, &c, 1, NULL, NULL);
    return c;
  }
  ...
}

then all the castings from char to uchar need to be replaced by using the toWideChar function and vise versa. for example:

String::String(const std::string &s, Type t)
  ...
  for(std::string::const_iterator it = s.begin(); it != s.end(); it++) {
    // *targetIt = uchar(*it);
    *targetIt = toWideChar(*it);
    ++targetIt;
  }
  ...
}

ByteVector String::data(Type t) const
{
  ...
  case Latin1:
  {
    for(wstring::const_iterator it = d->data.begin(); it != d->data.end(); it++)
      // v.append(char(*it));
      v.append(toAnsiChar(*it));
    break;
  }
  ...
}

and so on...

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson