# switching text encoding for Tag Source parser

**URL:** https://community.mp3tag.de/t/switching-text-encoding-for-tag-source-parser/10464
**Category:** Support
**Created:** [May 25, 2010, 6:28am UTC](https://community.mp3tag.de/t/switching-text-encoding-for-tag-source-parser/10464 "2010-05-25T06:28:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mp3outie](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@mp3outie](https://community.mp3tag.de/u/mp3outie)
#### Post date: [May 25, 2010, 6:28am UTC](https://community.mp3tag.de/t/switching-text-encoding-for-tag-source-parser/10464/1 "2010-05-25T06:28:28Z")

</div>

I'm modifying dano's [vgmdb.net](http://vgmdb.net) script so that I can import the Japanese song titles. The charset according to the html is UTF-8. The debug output file that's generated is in UTF-16 little-endian. I need to parse the html as UTF-8 but as far as I can tell there is no way of doing so. I tried using a lot of options for the [Encoding], but the help file seems to suggest it only applies for the interpretation of the URL.

Here's the code modified to hone in on the problem:

```
[Name]=VGMdb
[BasedOn]=VGMdb.net
[SearchBy]=http://vgmdb.net/album/5411
[Encoding]=utf-8

[ParserScriptAlbum]=...
# ###################################################################
# A L B U M
# ###################################################################
debug "on" "C:\zDebug\debug_VGMdb_B.html" "10"
debugwriteinput "C:\zDebug\VGMdb_B.html"

# Tracks
FindLine "id=\"tl9143\""
findline "class=\"smallfont\"><span class=\"label\">"
do

# outputto "Tracks"
    OutputTo "TitleJP"
    moveline 1
    findinline "width=\"100%\">"
    sayuntil "</td>"
    say "|"
    
    outputto "_Length"
    moveline 1
    sayregexp "(?<=<span class=\"time\">)[\d:]+(?=</span>)" ""
    say "|"

    findline "class=\"smallfont\"><span class=\"label\">" 1 1    
while "<td "

```

Here's the output when reaching a Japanese title (note that the first title for this particular album is correctly given in English):

=========

Script-Line : 39  
Command : sayuntil  
Parameter 1 : \>\<

Output : \>Overture|æ˜Ÿããšç¥­\<

Line and position:

æ˜Ÿããšç¥­

==========

The output at this point instead should be Overture|星くず祭. Is there a way to set the text encoding for the parser?

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [May 25, 2010, 7:14am UTC](https://community.mp3tag.de/t/switching-text-encoding-for-tag-source-parser/10464/2 "2010-05-25T07:14:39Z")

</div>

The parser auto-detects the encoding. Sometimes it fails.  
Maybe Florian can improve it.

---

<div class="post-metadata">

### Author: ![mp3outie](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@mp3outie](https://community.mp3tag.de/u/mp3outie)
#### Post date: [June 9, 2010, 4:31pm UTC](https://community.mp3tag.de/t/switching-text-encoding-for-tag-source-parser/10464/3 "2010-06-09T16:31:42Z")

</div>

I PM'd Florian the issue when I first read your reply, but he hasn't answered. I understand though seeing as how you all receive so many requests.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:22pm UTC](https://community.mp3tag.de/t/switching-text-encoding-for-tag-source-parser/10464/4 "2026-02-09T12:22:24Z")

</div>


