Changeset 193


Ignore:
Timestamp:
12/27/06 22:52:50 (17 years ago)
Author:
r2d
Message:
  • corrected tag reading bug for utf8 strings
  • tag writing works but need the windows port of TagLib
Location:
winamp-musepack/trunk/winamp-musepack
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • winamp-musepack/trunk/winamp-musepack/mpc_info.cpp

    r192 r193  
    3737System::Void mpc_info::btnUpdate_Click(System::Object^  sender, System::EventArgs^  e)
    3838{
     39        Hide();
    3940        player->writeTags(this);
    4041        Close();
  • winamp-musepack/trunk/winamp-musepack/mpc_info.h

    r192 r193  
    330330                        this->Controls->Add(this->groupBox2);
    331331                        this->Controls->Add(this->groupBox1);
     332                        this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle;
     333                        this->MaximizeBox = false;
     334                        this->MinimizeBox = false;
    332335                        this->Name = L"mpc_info";
    333336                        this->Text = L"Musepack file information";
  • winamp-musepack/trunk/winamp-musepack/mpc_player.cpp

    r192 r193  
    278278        if (!tag_file->isNull() && tag_file->tag()) {
    279279                TagLib::Tag *tag = tag_file->tag();
    280                 infoBox->txtTitle->Text = gcnew String(tag->title().toCString(true));
    281                 infoBox->txtArtist->Text = gcnew String(tag->artist().toCString(true));
    282                 infoBox->txtAlbum->Text = gcnew String(tag->album().toCString(true));
     280                infoBox->txtTitle->Text = gcnew String(tag->title().toCString(true), 0, strlen(tag->title().toCString(true)), System::Text::Encoding::UTF8);
     281                infoBox->txtArtist->Text = gcnew String(tag->artist().toCString(true), 0, strlen(tag->artist().toCString(true)), System::Text::Encoding::UTF8);
     282                infoBox->txtAlbum->Text = gcnew String(tag->album().toCString(true), 0, strlen(tag->album().toCString(true)), System::Text::Encoding::UTF8);
    283283                infoBox->txtYear->Text = "";
    284284                infoBox->txtYear->Text += tag->year();
    285285                infoBox->txtTrack->Text = "";
    286286                infoBox->txtTrack->Text += tag->track();
    287                 infoBox->comboGenre->Text = gcnew String(tag->genre().toCString(true));
    288                 infoBox->txtComment->Text = gcnew String(tag->comment().toCString(true));
     287                infoBox->comboGenre->Text = gcnew String(tag->genre().toCString(true), 0, strlen(tag->genre().toCString(true)), System::Text::Encoding::UTF8);
     288                infoBox->txtComment->Text = gcnew String(tag->comment().toCString(true), 0, strlen(tag->comment().toCString(true)), System::Text::Encoding::UTF8);
    289289        }
    290290}
Note: See TracChangeset for help on using the changeset viewer.