The synchronization of lyrics and fonts of Android multimedia players in Ubuntu is garbled.

Source: Internet
Author: User

The synced display of lyrics is added to the android multimedia player. Because the lyrics are directly down on the Internet and are in Chinese. Therefore, the encoding format is GBK, gb18030, and other Chinese character encoding formats. Garbled characters are displayed in Ubuntu. When these LRC are pushed to the SD card for parsing, garbled characters are also displayed.


The solution is as follows:

1. Configure the gedit encoding list. The following is an article on the Ubuntu Official Website:

By default, garbled characters are displayed when you use the Ubuntu Text Editor (gedit) to open Chinese-encoded text files of the gb18030, GBK, and gb2312 types.

This is because gedit uses an encoding matching list. Only the encoding in this list is matched. Encoding not in this list is garbled. All you need to do is add gb18030 to the matching list.

  • Command Line Method, applicable to all Ubuntu users.

Copy the following command to the terminal and press Enter:

Gconftool-2 -- set -- type = list -- list-type = string/apps/gedit-2/preferences/encodings/auto_detected "[UTF-8, current, gb18030, BIG5-HKSCS, UTF-16]"

  • Graphical mode, applicable to Ubuntu users, not kubuntu/xubuntu users.

Follow these steps to make your gedit correctly display the Chinese encoding file.

  1. Press the Alt-F2 to open the run application dialog box.
  2. In the text box, type "gconf-Editor" and press the Enter key to open "configuration Editor ".
  3. Expand the tree node on the left, find the/apps/gedit-2/preferences/encodings node, and click it.
  4. Double-click the auto_detected key on the right to open the edit key dialog box.
  5. Click Add on the right of the list, enter gb18030, and click OK.
  6. A "gb18030" is added at the bottom of the list ". Click Select it, and click the "up" button on the right until "gb18030" is at the top of the list.
  7. Click OK to close the configuration editor.

Now, your gedit should be able to smoothly open the gb18030 encoded text file.


2. The lyrics downloaded from the Internet are generally ended in ASP format. Rename it with the suffix LRC and the song name as the prefix. It is then encoded in UTF-8 and stored in Unix/Linux format at the end of the line. (This is important because the default Android encoding is UTF-8 ).

In this way, when cat file in the android shell is found to be all Chinese characters, no garbled characters will appear during parsing.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.