Turkish character encoding problem

Hello everyone, I’am trying to fix title encoding of plot. While im plotting new graph with Turkish characters pygmt not giving proper output. I added the graph below the code.

import pygmt
import numpy as np
import pandas as pd

with open(“tusaga_ist_ad.txt”, “r”) as ist:
ist_ad = ist.read().splitlines()

with open(“tusaga_ist_kord.txt”, “r”) as ist:
ist_kord = ist.read().splitlines()

enlem=[];boylam=[]
for i in ist_kord:
enlem.append(i.split(" “)[0])
boylam.append(i.split(” ")[1])

ist.close()

pygmt.config(PS_CHAR_ENCODING=‘ISO-8859-9’)
pygmt.config(GMT_LANGUAGE=‘TR’)

fig = pygmt.Figure()

fig.coast(
region=[24,45,35,43],
projection=“M15i”,
land=“white”,
water=“lightblue”,
shorelines=True,
resolution=“f”,
borders=“a”,
frame=[“xa2”,“ya2”, “WSne+tTUSAGA-Aktif İstasyonları”],
)

fig.plot(x=boylam, y=enlem, style=“i0.25c”, color=“black”, pen=“black”)

fig.text(x=boylam, y=enlem, text=ist_ad, offset=“0c/0.2c”, font=“5p” )
fig.show()

Hi @osmnbtrclk. Welcome to GMT forum!!

Which is the character that do you want to write?

Hello, I want to use " ç, ı, ü, ğ, ö, ş, İ, Ğ, Ü, Ö, Ş, Ç " characters.

You have to use the octal codes. I don’t know if there is a code for all the turkish characters.

For example I use the ISOLatin1+
gmt basemap -RTR -Baf -B+t"\347 \374 \366 \307" -png turkey -JM15c

Thank you, I’will try it.