Foreign characters not displaying correctly

Booting, installing, newbie
Post Reply
Message
Author
liro

Foreign characters not displaying correctly

#1 Post by liro »

I've downloaded a film subtitle in Polish from www.opensubtitles.org. On the download page it gives you the option to preview the first part of the subtitle text. When I do this (in Firefox) the subtitles display fine with the proper Polish letters.

However, after downloading the subtitle text file, it doesn't display correctly in any other program in Puppy (Abiword, Geany, leafpad) or when I try to actually load it as a subtitle in Mplayer.

To give an example of what I mean: "Święty Mikołaj" appears as "Œwiêty Miko³aj", "Wesołych Świąt" as "Weso³ych Œwi¹t!", etc...

Three things I should add:
1) I had this exact same problem in Windows and fixed it by changing the language settings to Polish, after which the subtitle texts automatically displayed correctly.

2) I've tried changing the default language in Puppy to Polish, and also installing the Polish language pack, but this didn't make any difference.

3) Without doing any of the above, I actually had the same subtitles displaying correctly in all of the above-mentioned programs a couple of months ago, but like a fool can't remember how I did it :|.

Thanks for any help with this...

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#2 Post by SFR »

Cześć Liro.

I had the same problem and found 3 workarounds so far.

1. Usually changing the codepage works, in example of Gnome-mplayer:
Edit -> Preferences -> Language Settings -> File Metadata Encoding -> CP1250

2. If 1 doesn't work, try to use this to convert the subtitle file:

Code: Select all

iconv -f WINDOWS-1250 -t UTF-8 original.txt > converted.txt
3. If 2 doesn't work - manually ("find & replace") correct wrong characters. :roll:

HTH
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

liro

#3 Post by liro »

Cześć SFR! Dziękuję za opowiedź.

I had already tried your options 1 and 3. In fact, I'm pretty sure that changing the encoding in Gnome-mplayer to CP1250 was how I fixed this last time (so I don't know why it doesn't work now :[). The "find and replace" method was what I did at first in Windows, but it took me ages and I still managed to miss out a couple of Polish capital letters.

I've just tried your option 2 (I had to download the iconv.pet as I didn't have it installed), but unfortunately it just gives me the message "conversion from Windows-1250 is not supported" :/

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#4 Post by SFR »

liro wrote:I've just tried your option 2 (I had to download the iconv.pet as I didn't have it installed), but unfortunately it just gives me the message "conversion from Windows-1250 is not supported" :/
Indeed, unlike in Lupu-528, iconv is not available OOTB, at least in Slacko-5.3.3 I'm currently on.
It was probably installed as a part of something else (Battleshooter's Conky+Lua has libiconv-1.14.pet as a dep.) in my case, sorry.

You could also try CP1250 instead of WINDOWS-1250, btw.

There's also "recode" tool (check in your PPM).

Code: Select all

recode CP1250..UTF-8 < original.txt > converted.txt
seems to do the same job...

The funny thing is that I too probably don't remember exactly how I did it in the past, because although the conversion works and every single character is displayed correctly in Geany, Gnome-mplayer displays ?? instead, regardless of chosen encoding.
But, for instance, VLC-1.1.11 displays prefectly such converted subtitles...
General confusion. :roll:

One more thing: you can try to determine the original encoding using:

Code: Select all

file susbtitles.txt
but it didn't help me really with these specific, "problematic" subtitles.

Anyway, good luck with this. :)

Pozdrawiam! / Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

adnan360
Posts: 1
Joined: Wed 21 Nov 2012, 14:07

Bangla utf-8 problem solution

#5 Post by adnan360 »

I have had a problem with Bangla text viewing myself. I am using Slacko Puppy 5.3.3

Problem:

- I could not see Bangla language (unicode) text on seamonkey. Only boxes where unicode characters should be.
- I could see the same boxes in the Setup > puppy setup> personalization dialog... in the language under bn (Bangla) entry

Solution (thanks to jiohdi and iluminameluna at IRC):

1. Downloaded the font for Bangla. In my case it was "SolaimanLipi" which is freely downloadable (google it)

2. Opened the terminal and su and then entered rox and then created a directory /root/.fonts

3. Copied the downloaded font in /root/.fonts

Now the font is showing in every place. and even the setup dialog.

Amazing how it works. But it works!!

Post Reply