Showing posts with label Chinese. Show all posts
Showing posts with label Chinese. Show all posts

2012/05/19

Make your Chinese SRT file display correctly

Recently I just upgraded my Ubuntu Desktop from 11.04 to 12.04 LTS. And of course a lot new problems came to me.

And one of the problem is the SRT file.

Actually, this is not a new problem to me, but I was always choosing the workaround way.

This time, no more workaround. I'll present you the correct way.

Until now I still don't have a clue for the root cause of this problem yet, but in chunghe's blog I found this is really nice and easy way to solve the problem.

Problem Description

The original contain of the SRT is like this.

I still can see the numbers, which means the file is somewhat correct, but the Chinese word didn't display correctly.

image

In gEdit, I tried to open it with UTF-8 encoding

image

There are errors

image

 

Solutions

For chunghe's blogpost, he introduced an utility called enca.

Usage1 show file information  : enca <filename>

image

This will display the information of the file content. For my file here it shows

It's Big5(Is this the reason I cannot see the font correctly?) , with CRLF line terminators.

 

Usage 2 convert file to desired format : enca –x <encoding>

I wrote an scritp to do this. The content is :

enca -x UTF-8 < $1.srt > $1.utf8.srt

The content of the converted file.

image

 

Conclusion

This way is much easier and more straight and forward.

Before this, I have to copy the file to Windows environment and open notepad++ to convert it to UTF-8.

Now everything can be done under Ubuntu. 微笑

2011/10/15

How to change UI Language on Ubuntu 11.10

After using the fancy login and Unity, I found one problem for different language user.
How do I change the UI to different language?
There is no Language option  for me to choose.
Here comes the solution
In the System Settings
User Accounts

Language
And pick the Language you're going to use.
And login again.
Now you're using your language UI. Enjoy...

By the way, if you got better idea of how to change this in an easier way, please kindly let me know.
Thanks.