# Convert Windows 1252 -\> UTF-8

**URL:** <https://the.fmsoup.org/t/convert-windows-1252-utf-8/2991>\
**Category:** Questions\
**Tags:** community\
**Created:** [July 12, 2022, 4:39pm UTC](https://the.fmsoup.org/t/convert-windows-1252-utf-8/2991 "2022-07-12T16:39:37Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![OliverBarrett](https://avatars.discourse-cdn.com/v4/letter/o/f19dbf/32.png) [@OliverBarrett](https://the.fmsoup.org/u/OliverBarrett)\
**Post date:** [July 12, 2022, 4:39pm UTC](https://the.fmsoup.org/t/convert-windows-1252-utf-8/2991/1 "2022-07-12T16:39:37Z")

</div>

Is there a way in FileMaker to convert existing Windows 1252-formatted text to UTF-8?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![MonkeybreadSoftware](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/monkeybreadsoftware/32/361_2.png) [@MonkeybreadSoftware](https://the.fmsoup.org/u/MonkeybreadSoftware)\
**Post date:** [July 12, 2022, 5:18pm UTC](https://the.fmsoup.org/t/convert-windows-1252-utf-8/2991/2 "2022-07-12T17:18:22Z")

</div>

You mean reading a text file in that encoding?

---

<div class="post-metadata">

**Author:** ![OliverBarrett](https://avatars.discourse-cdn.com/v4/letter/o/f19dbf/32.png) [@OliverBarrett](https://the.fmsoup.org/u/OliverBarrett)\
**Post date:** [July 12, 2022, 5:22pm UTC](https://the.fmsoup.org/t/convert-windows-1252-utf-8/2991/3 "2022-07-12T17:22:55Z")

</div>

I mean converting Windows 1252 (in this case) -\> UTF-8 to eliminate problem characters like smart quotes and the like.

I need to export this file for other programs to use.

Thx

---

<div class="post-metadata">

**Author:** ![steve\_ssh](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/steve_ssh/32/160_2.png) [@steve\_ssh](https://the.fmsoup.org/u/steve_ssh)\
**Post date:** [July 12, 2022, 6:52pm UTC](https://the.fmsoup.org/t/convert-windows-1252-utf-8/2991/4 "2022-07-12T18:52:57Z")

</div>

The [help pages for the TextEncode and TextDecode functions](https://help.claris.com/en/pro-help/content/textencode.html) indicate that both Windows 1252 and UTF-8 are supported. That makes prospects seem promising (though I must admit that I am not certain that I accurately understand the task as described above).

Hope this helps!

---

<div class="post-metadata">

**Author:** ![OliverBarrett](https://avatars.discourse-cdn.com/v4/letter/o/f19dbf/32.png) [@OliverBarrett](https://the.fmsoup.org/u/OliverBarrett)\
**Post date:** [July 12, 2022, 7:03pm UTC](https://the.fmsoup.org/t/convert-windows-1252-utf-8/2991/5 "2022-07-12T19:03:56Z")

</div>

Just want to remove all the Unicode characters from some text and end up with "regular" UTF-8.

Thanks

---

<div class="post-metadata">

**Author:** ![bdbd](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/bdbd/32/620_2.png) [@bdbd](https://the.fmsoup.org/u/bdbd)\
**Post date:** [July 12, 2022, 7:19pm UTC](https://the.fmsoup.org/t/convert-windows-1252-utf-8/2991/6 "2022-07-12T19:19:36Z")

</div>

Hey @OliverBarrett,

UTF-8 stands for " Unicode Transformation Format – 8-bit". It is Unicode. Regular UTF-8 can encode all of the Unicode character set (144 697 characters).

Do you mean limiting the result to one-byte UTF-8 code points? If so, you are then trying to encode Windows-1252 to ASCII.

---

<div class="post-metadata">

**Author:** ![OliverBarrett](https://avatars.discourse-cdn.com/v4/letter/o/f19dbf/32.png) [@OliverBarrett](https://the.fmsoup.org/u/OliverBarrett)\
**Post date:** [July 12, 2022, 7:38pm UTC](https://the.fmsoup.org/t/convert-windows-1252-utf-8/2991/7 "2022-07-12T19:38:28Z")

</div>

Just trying to strip out the smart quotes and other (possible) 1252 UTF stuff in Windows 1252.

Thanks

---

<div class="post-metadata">

**Author:** ![bdbd](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/bdbd/32/620_2.png) [@bdbd](https://the.fmsoup.org/u/bdbd)\
**Post date:** [July 12, 2022, 8:04pm UTC](https://the.fmsoup.org/t/convert-windows-1252-utf-8/2991/8 "2022-07-12T20:04:07Z")

</div>

I get it.

I suggest you look at using the Substitute function for the select characters you want translated.

BTW… Keep in mind that text is stored as Unicode encoded characters in FileMaker… except in container fields or calculation fields returning container results. Whether the encoding uses UTF-8, UTF-16 or UTF-32, I don't know.

---

<div class="post-metadata">

**Author:** ![OliverBarrett](https://avatars.discourse-cdn.com/v4/letter/o/f19dbf/32.png) [@OliverBarrett](https://the.fmsoup.org/u/OliverBarrett)\
**Post date:** [July 12, 2022, 8:09pm UTC](https://the.fmsoup.org/t/convert-windows-1252-utf-8/2991/9 "2022-07-12T20:09:09Z")

</div>

I'm actually already doing the equivalent technique in another language where the data are coming from FileMaker. I was just wondering if I had missed an easy step where this parsing wasn't needed.

Appreciate your replies!

---

<div class="post-metadata">

**Author:** ![MonkeybreadSoftware](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/monkeybreadsoftware/32/361_2.png) [@MonkeybreadSoftware](https://the.fmsoup.org/u/MonkeybreadSoftware)\
**Post date:** [July 13, 2022, 6:08pm UTC](https://the.fmsoup.org/t/convert-windows-1252-utf-8/2991/10 "2022-07-13T18:08:49Z")

</div>

See also [Text.ConvertToTextEncoding](https://www.mbsplugins.eu/TextConvertToTextEncoding.shtml) and [Text.ConvertFromTextEncoding](https://www.mbsplugins.eu/TextConvertFromTextEncoding.shtml) function in [MBS FileMaker Plugin](https://www.monkeybreadsoftware.com/filemaker/) to convert between different text encodings, even very exotic ones.

---

<div class="post-metadata">

**Author:** ![OliverBarrett](https://avatars.discourse-cdn.com/v4/letter/o/f19dbf/32.png) [@OliverBarrett](https://the.fmsoup.org/u/OliverBarrett)\
**Post date:** [July 13, 2022, 6:27pm UTC](https://the.fmsoup.org/t/convert-windows-1252-utf-8/2991/11 "2022-07-13T18:27:22Z")

</div>

Interesting. How does your code work? Do you parse the text and remove things like smart quotes and such are are you using a library internally?  
Really wondering!  
Thanks Christian.

---

<div class="post-metadata">

**Author:** ![MonkeybreadSoftware](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/monkeybreadsoftware/32/361_2.png) [@MonkeybreadSoftware](https://the.fmsoup.org/u/MonkeybreadSoftware)\
**Post date:** [July 13, 2022, 6:39pm UTC](https://the.fmsoup.org/t/convert-windows-1252-utf-8/2991/12 "2022-07-13T18:39:07Z")

</div>

This uses iconv library.  
Some characters are changed, e.g. – to -, if the encoding has no – as character (wide dash).  
Other characters may simply be changed to ? in conversion.

We made it to convert to some exotic old DOS encodings to send to a device.

---

<div class="post-metadata">

**Author:** ![OliverBarrett](https://avatars.discourse-cdn.com/v4/letter/o/f19dbf/32.png) [@OliverBarrett](https://the.fmsoup.org/u/OliverBarrett)\
**Post date:** [July 13, 2022, 7:30pm UTC](https://the.fmsoup.org/t/convert-windows-1252-utf-8/2991/13 "2022-07-13T19:30:16Z")

</div>

Thanks
