Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. 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.

2011/10/14

Ubuntu 11.10 Released

Upgraded my 11.04 to 11.10.
The new login screen is cool.


And the Unity feature now is supported even on my virtual machine.
Anyone who likes Ubuntu should try this then.



2011/05/08

2011/03/20

3 steps to install/upgrade OpenOffice.org on your ubuntu


Applied on 9.10 and up


  • sudo add-apt-repository ppa:openoffice-pkgs/ppa
  • sudo apt-get update
  • sudo apt-get install openoffice.org

2011/01/04

Grub Rescue

The following text is reference from this blog article.
The original text is Chinese. I translate it into English
http://tw.myblog.yahoo.com/jw!39j4lB.fEQ9h3IciAIk-/article?mid=421
I originally got a SATA II Hard Drive and installed a Ubuntu 10.10 on it.
And for some unknown reason. It won't show the grub menu.
Then I choose install another Ubuntu on another disk and the 2nd Ubuntu is smart and can let me get my 1st Ubuntu
But after that I found there are too many software need to be re-install & configure
I decide to go the hard way.
The error message is

No such a device


I have no idea what should I do then.
After googled from that blog article.
I follow his instruction and unattach my 2nd hard disk and do the following:


grub rescue>set
prefix=(hd0,msdos1)/boot/grub
root=hd0,msdos1






This seems correct, then I do


grub rescue>ls
(hd0), (hd0,1)



I got only one partition, so I can startup via the 1st partition

grub rescue>set root=(hd0,1)
grub rescue>set prefix=(hd0,1)/boot/grub
grub rescue>insmod normal
rescue:grub>normal



Then I can see my grub menu(Long time no see)
Then I got a normal startup (No more extra hard disk)

After in the GUI of Ubuntu, now need to modify the 
/boot/grub/grub.cfg

run update-grub to update the grub menu
sudo update-grub


now reinstall the grub

sudo grub-install /dev/sda

restart again. my 1st Ubuntu is back :)

2010/10/11

Increase speed of your JDownloader on Ubuntu

change your jdownloader.desktop under /usr/share/applications


[Desktop Entry]
Name=JDownloader
Categories=Network;FileTransfer
Exec=java -jar /home/eric/.jdownloader/JDownloader.jar -Dsun.java2d.opengl=true
Icon=jdownloader
Terminal=false
Type=Application

original is just jdownloader

2010/09/20

3 steps to install JDownloader on your Ubuntu

Applied on 9.10 and up

  • sudo add-apt-repository ppa:jd-team/jdownloader
  • sudo apt-get update
  • sudo apt-get install jdownloader

2010/06/20

Solution of Chinese font display for flash player on Ubuntu 10.04 (Lucid)

  1. sudo vi /etc/fonts/conf.avail/69-language-selector-zh-tw.conf
  2. under the tag

                                           
                         sans-serif    
               
               
    There are a lot fonts.
    Change the sequence WenQuanYi Micro Hei to first.
  3. restart your os and check again. 

2010/06/19

How to putty your Ubuntu

Most of the Ubuntu Desktop version has OpenSSH installed as a default.
However, Ubuntu Server seems not.

$sudo apt-get install openssh-server