# Maori Language Characters?

**URL:** https://forum.generic-mapping-tools.org/t/maori-language-characters/6002
**Category:** Q&A
**Created:** [June 15, 2025, 2:33am UTC](https://forum.generic-mapping-tools.org/t/maori-language-characters/6002 "2025-06-15T02:33:22Z")
**Posts on this page:** 5
**Page:** 2

<div class="post-metadata">

### Author: ![mkononets](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/mkononets/32/4029_2.png) [@mkononets](https://forum.generic-mapping-tools.org/u/mkononets)
#### Post date: [June 28, 2025, 5:50pm UTC](https://forum.generic-mapping-tools.org/t/maori-language-characters/6002/21 "2025-06-28T17:50:40Z")

</div>

> [@Joaquim](#):
>
> ```auto
> C:\v>chcp
> Active code page: 437
> 
> ```

Linux terminals have used unicode (utf8) for a while. The above might work after `chcp 65001` so the string input is also utf8:

```auto
C:\Documents and Settings\mkononets\Desktop>chcp 437
Active code page: 437

C:\Documents and Settings\mkononets\Desktop>echo "Īī Ii" > test.txt

C:\Documents and Settings\mkononets\Desktop>type test.txt
"Ii Ii"

C:\Documents and Settings\mkononets\Desktop>chcp 65001
Active code page: 65001

C:\Documents and Settings\mkononets\Desktop>echo "Īī Ii" > test.txt

C:\Documents and Settings\mkononets\Desktop>type test.txt
"Īī Ii"

C:\Documents and Settings\mkononets\Desktop>chcp 437
Active code page: 437

C:\Documents and Settings\mkononets\Desktop>type test.txt
"─¬─½ Ii"

```

the above is on Windows XP cmd.exe. codepage 65001 is supposed to be utf8.

---

<div class="post-metadata">

### Author: ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)
#### Post date: [June 28, 2025, 6:16pm UTC](https://forum.generic-mapping-tools.org/t/maori-language-characters/6002/22 "2025-06-28T18:16:32Z")

</div>

I can reproduce that exactly with the Windows terminal (which is not the old Windows cmd). But even with `chcp 65001` your example doesn’t work for me. It print just the ASCII characters.

---

<div class="post-metadata">

### Author: ![timhume](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/timhume/32/296_2.png) [@timhume](https://forum.generic-mapping-tools.org/u/timhume)
#### Post date: [June 28, 2025, 8:28pm UTC](https://forum.generic-mapping-tools.org/t/maori-language-characters/6002/23 "2025-06-28T20:28:43Z")

</div>

I suspect progress could be made on this by setting the encoding to ISO8859-13, and using a custom font as described in manual and example 31(???). I tried this last night, but didn’t get the font stuff working properly.

---

<div class="post-metadata">

### Author: ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)
#### Post date: [June 28, 2025, 8:52pm UTC](https://forum.generic-mapping-tools.org/t/maori-language-characters/6002/24 "2025-06-28T20:52:07Z")

</div>

This is definitively an area where I know little. But if people are able to make GMT plots with Chinese characters I would say that all the other should be possible as well.

---

<div class="post-metadata">

### Author: ![timhume](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/timhume/32/296_2.png) [@timhume](https://forum.generic-mapping-tools.org/u/timhume)
#### Post date: [June 29, 2025, 4:11am UTC](https://forum.generic-mapping-tools.org/t/maori-language-characters/6002/25 "2025-06-29T04:11:05Z")

</div>

Cracked it.

Firstly get the font that you want to install. How this is done depends on the operating system. For MacOS with `homebrew`, the following sufficed to install the [Biolinum](http://www.linuxlibertine.org) font:

```auto
brew install font-linux-biolinum

```

Then find the directory where the font was installed, and note this. In my case the fonts were installed in `~/Library/Fonts` - your directory will differ. Also note what the installed font was actually called:

```auto
$ ls -1 ~/Library/Fonts/*Biolinum*
/Users/tim/Library/Fonts/LinBiolinum_Kah.ttf
/Users/tim/Library/Fonts/LinBiolinum_Rah.ttf
/Users/tim/Library/Fonts/LinBiolinum_RBah.ttf
/Users/tim/Library/Fonts/LinBiolinum_RIah.ttf

```

The font I’m interested in is `LinBiolinum_Rah` which is the regular font. The others are a “key” font (looks like typewriter keys), bold and italics.

The following script shows an example of using the newly installed font with an alternative character encoding. Make sure you change the PS\_CONVERT line to include the directory where your font was installed, and specify the correct name for the font you want to use.

```auto
#!/usr/bin/env bash

function gmtstr(){
	echo "${1}" | sed -e 's/ʻ/\\140/g' \
		-e 's/:/\\072/g' \
		-e 's/ā/\\342/g' \
		-e 's/Ā/\\302/g' \
		-e 's/ō/\\364/g' \
		-e 's/Ō/\\324/g' \
		-e 's/ē/\\347/g' \
		-e 's/Ē/\\307/g' \
		-e 's/ū/\\373/g' \
		-e 's/Ū/\\333/g' \
		-e 's/ī/\\356/g' \
		-e 's/Ī/\\316/g'
}

gmt begin fontexample png
	# Set FONTPATH used in image conversion
	# $(dirname 0) is the path to the current bash script
	gmt set PS_CONVERT="C-sFONTPATH=/Users/tim/Library/Fonts"

	# create file PSL_custom_fonts.txt in current working directory
	# and add PostScript font names of Linux Biolinum
	awk '{print $1, 0.700, 0}' <<- EOF > PSL_custom_fonts.txt
	LinBiolinum_Rah
	EOF

	# common settings
	gmt set MAP_DEGREE_SYMBOL degree PS_CHAR_ENCODING ISO-8859-13 \
		FONT LinBiolinum_Rah FONT_TITLE 24p,LinBiolinum_Rah
	gmt coast -Df -JT-177/0/15c -R-175:23:0.5/-21:29:0.5/-174:51:0.5/-21:0:0.5+r \
		-Wthinnest,black -BWSen+t$(gmtstr "ʻĀŌĒŪĪāōēūī") \
		-Bpxf3ma15mg15m -Bpyf3ma15mg15m -Scyan -Ggreen
gmt end show

```

And here is the proof it works:

 ![fontexample](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/a/a1f160368104cfdd6b24db83afcabfaaed02cbe9.png)

[Previous page](https://forum.generic-mapping-tools.org/t/maori-language-characters/6002.md?page=1)
