How I resolved russian texts on windows version gmt 6.1

I started to work in GMT only 45 days or so.
When I faced with placing russin texts , it always so me some garbage letters instead.
Guys from my www.foxclub.ru forum adviced to me
to try escap sequencies . After some tries I did it .
For not looking always to tables of iso codes I wrote some function,
which produce me some code text into clipboard, and I put it in scrip.
Here one sample of the script
gmt begin GMT_tut_1
gmt set GMT_LANGUAGE RU
gmt set PS_CHAR_ENCODING ISO-8859-5
gmt basemap -R10/70/-3/8 -JX4i/3i -B -B+t"\262\327\340\353\322\353\40 \330\40 \321\333\330\326\320\331\350\330\325\40 \332\40 \335\330\334\40 \337\336\40 \322\340\325\334\325\335\330\40 \330\40 \340\320\341\341\342\336\357\335\330\356\40 \327\325\334\333\325\342\340\357\341\325\335\330\357"
gmt end show
Later I have discovered , that words of months , days of weeks also shoe garbage in russin varint. But these words were correct in gmt_ru
So, I changed all russian texts in this file on escape simbols
Looks like this

GMT Time language file for RU (Russion) mode [RU]

#-------------------------------------------------

Monthnames, with 3-char and 1-char abbreviations

M 1 \317\335\322\320\340\354 \317\335\322 \317
M 2 \304\325\322\340\320\333\354 \304\325\322 \304
M 3 \274\320\340\342 \274\320\340 \274
M 4 \260\337\340\325\333\354 \260\337\340 \260
M 5 \274\320\331 \274\320\331 \274
M 6 \270\356\335\354 \270\356\335\354 \270
M 7 \270\356\333\354 \270\356\333 \270
M 8 \260\322\323\343\341\342 \260\322\323 \260
M 9 \301\325\335\342\357\321\340\354 \301\325\335 \301
M 10 \276\332\342\357\321\340\354 \276\332\342 \276
M 11 \275\336\357\321\340\354 \275\336\357 \275
M 12 \264\325\332\320\321\340\354 \264\325\332 \264

So , now I can work in russian windows version of gmt
with russian text in the right way

Maybe @uleysky will have some advice on this issue.

Interesting. Indeed, the RU locale does not work with encoding ISO-8859-5 because the locale file has a CP1251 encoding. I have never met this error, because my russification method was created many years ago and is based on direct modification of EPS files. @pwessel, fix it is not difficult, just recode the locale file with iconv:
iconv -f CP1251 -t ISO-8859-5 gmt_ru.locale >gmt_ru.locale.new
I think we need some script for testing locales, creating timelines to test localized labels.

@CraneBoba, can you share you reencoding function? This is trivial in Linux, but it can be useful for Windows users.

Sure
Here is the function
written on VFP language
I decoded table of iso
and putted it content to dbf table with index
Yuo are right, cp1251 is russian code page in windows,
but win gmt 6.1 for me did not give me correct text
Sample of using function
?getiso(‘Это Вова’)
Function getiso
Lparameters ltext
If Not Used(‘outxls’)
Use c:\outxls.Dbf In 0 Shared
Endif
Create Cursor curtext (lwrd c(254))
lctext = ‘’
ln = Len(ltext)
For ii = 1 To ln
lcchar = Substr(ltext, ii, 1)
IF SEEK(lcchar, ‘outxls’, ‘let’)
lctext = lctext + ‘’ + outxls.f5
endif
ENDFOR
INSERT INTO curtext VALUES (lctext)
SELECT curtext
BROWSE
Sample of the script
gmt begin GMT_tut_1
gmt set GMT_LANGUAGE RU
gmt set PS_CHAR_ENCODING ISO-8859-5
gmt basemap -R10/70/-3/8 -JX4i/3i -B -B+t"\262\327\340\353\322\353\40 \330\40 \321\333\330\326\320\331\350\330\325\40 \332\40 \335\330\334\40 \337\336\40 \322\340\325\334\325\335\330\40 \330\40 \340\320\341\341\342\336\357\335\330\356\40 \327\325\334\333\325\342\340\357\341\325\335\330\357"
gmt end showgmt_ru.zip (820 Bytes)
outxls.zip (2.7 KB)

Sample of the script for months
names
without
strings
gmt set GMT_LANGUAGE RU
gmt set PS_CHAR_ENCODING ISO-8859-5
and changing gmt_locale
it gives garbage
I like to remind, I work on windows in gmt version
for windows 6.1
Run scripts in black window named gmt prompt
command

gmt begin GMT_-B_time1
gmt set GMT_LANGUAGE RU
gmt set PS_CHAR_ENCODING ISO-8859-5
gmt set FORMAT_DATE_MAP=-o FONT_ANNOT_PRIMARY +9p
gmt basemap -R2000-4-1T/2000-5-25T/0/1 -JX12c/0.5c -Bpxa7Rf1d -Bsxa1O -BS
gmt end show