INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: M3U8 playlist import garbles UTF-8  (Read 574 times)

javaweasel

  • Member
  • *
  • Posts: 4
M3U8 playlist import garbles UTF-8
« on: October 27, 2022, 12:27:47 am »

I assemble a radio show that plays foreign artists in two different studio locations, and when moving to the second studio, I export playlists from Swinsian using the M3U8 file format. That is the only file format available.

When importing the resulting playlist into MC v 30, it skips any line that contains accented characters, then in the following line, it assigns the file location to the incorrect artist. It seems that MC import rejects any UTF-8 characters, even though it's a M3U8 file.

I've attempted to remove any #EXTINF lines and just leave the file path, but if there are accented characters in the file name, MC refuses to import the line, then still assigns incorrect artist/title in subsequent file paths that don't contain UTF-8 characters.

The example playlist is M3U8, but edited to have an M3U extension as the attachment option disallows M3U8 files.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: M3U8 playlist import garbles UTF-8
« Reply #1 on: October 27, 2022, 12:41:21 pm »

I don't have your files, but I just tried your playlist and we do load the data as UTF-8.
Logged
Matt Ashland, JRiver Media Center

javaweasel

  • Member
  • *
  • Posts: 4
Re: M3U8 playlist import garbles UTF-8
« Reply #2 on: October 27, 2022, 01:37:12 pm »

Huh. OK, that's weird. Confirming you got 23 tracks listed in your imported playlist off of my M3U file? I only get 14, and the artist/title tags are messed up whenever it skips a line with an accented character. I've attached a screenshot.

Is there a character encoding setting that I'm missing somewhere?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: M3U8 playlist import garbles UTF-8
« Reply #3 on: October 27, 2022, 02:05:57 pm »

Here are the filenames we try to import:
Z:\celtic\Bua\Foscadh ón mBáisteach (A Shelter from the Rain)\07 - Caisleán a' tSléibhe - Bua - Foscadh ón mBáisteach (A Shelter from the Rain).flac
Z:\celtic\Bua\Foscadh ón mBáisteach (A Shelter from the Rain)\06 - Maid in the Cherry Tree-Sandymount - Bua - Foscadh ón mBáisteach (A Shelter from the Rain).flac
Z:\celtic\Breton\Nijadell\Ster Ar Vuhé\11 - Rond De Saint Valentin - Nijadell - Ster Ar Vuhé.mp3
Z:\celtic\Breton\Bagad Ar Meilhoù Glaz (Moulin Vert - Quimper)\Steir eo\17 - Gavotte du Bas Léon - Bagad Ar Meilhoù Glaz (Moulin Vert - Quimper) - Steir eo.mp3
Z:\celtic\Breton\Various Artists\Championnat national des bagadoù de 1ère catégorie, Lorient 2015\D3-05 - Bagad Elven - Bagad Elven - Championnat national des bagadoù de 1ère catégorie - Lorient 2015.mp3
Z:\celtic\Breton\Bernard Loffet\Action!\08 - Pach'pi - Bernard Loffet - Action!.mp3
Z:\celtic\Breton\Jean-Charles Guichen\Chadenn denel\02 - Ar vein roz - Jean-Charles Guichen - Chadenn denel.mp3
Z:\celtic\Breton\Jean-Charles Guichen\Chadenn denel\05 - Border Lines - Jean-Charles Guichen - Chadenn denel.mp3
Z:\celtic\Breton\Sylvain Barou & Ronan Pellen\The Last Days of Fall\02 - The Rainy Day-Sweeney's Wheel - Sylvain Barou, Ronan Pellen - The Last Days of Fall.mp3
Z:\celtic\Breton\Bernard Loffet\Action!\04 - Suite de ronds de Loudéac - Rond, baleu, rond, riquegnée - Bernard Loffet - Action!.mp3
Z:\celtic\Great Big Sea\Play\05 - Donkey Riding - Great Big Sea - Play.mp3
Z:\celtic\Great Big Sea\Rant And Roar\11 - Lukey - Great Big Sea - Rant And Roar.mp3
Z:\celtic\Glengarry Bhoys\Mill Sessions\04 - Itchy Fingers - The Glengarry Bhoys - Mill Sessions.mp3
Z:\celtic\Kiérah\A Fiddle Affair\08 - Farewell to Eire-Castle Kelly-The Musical Priest - Kierah - A Fiddle Affair.mp3
Z:\celtic\La Bottine Souriante\Je voudrais changer d'chapeau\10 - Hommage À Edmond Parizeau _ Dedicado À Jos - La Bottine Souriante - Je Voudrais Changer D'chapeau.mp3
Z:\celtic\Cassie and Maggie\Sterling Road\09 - Sweet Melodies - Cassie and Maggie - Sterling Road.mp3
Z:\celtic\The Dardanelles\The Dardanelles\07 - Rakish Paddy Set - The Dardanelles - The Dardanelles.mp3
Z:\celtic\Sophie & Fiachra + André Marchand\Portraits\10 - Hommage à jean desgagné, La grande gigue simple - Sophie & Fiachra + André Marchand - Portraits.mp3
Z:\celtic\Ship in the Clouds\Ship in the Clouds\05 - Slide Do Caoimhin-The Whistling Thief-Con Cassidy's - Ship in the Clouds - Ship in the Clouds.flac
Z:\celtic\Liz Carroll\Double Play\07 - Down at the Wakehouse-The True Love of My Heart - Liz Carroll and John Doyle - Double Play.mp3
Z:\celtic\Brad Tuck\The Isolation Sessions\02 - Beeswing - Brad Tuck - The Isolation Sessions.mp3
Z:\celtic\Rory Campbell _ Malcolm Stitt\Nusa\11 - Paper Year - Rory Campbell _ Malcolm Stitt - Nusa.mp3
Z:\celtic\Cassie and Maggie\Sterling Road\04 - Hurricane Jane - Cassie and Maggie - Sterling Road.mp3
Logged
Matt Ashland, JRiver Media Center

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2618
Re: M3U8 playlist import garbles UTF-8
« Reply #4 on: October 27, 2022, 02:40:19 pm »

I believe the tags are imported not from the M3U but from the ID3 tag on the file itself. It's likely that those are the source of the bad values you see in MC. You can open the Tag panel for a file and see the "Tag Dump" to check what is actually saved inside each file. It's possible that Swinsian is not using UTF8 on the ID3 tag. Also, make sure it can write ID3v2.3 as v1 cannot specify any encoding.

For the missing files, you need to check if the file/path on disk actually matches exactly to what the M3U says. Perhaps MC simply is not finding those files because they are written using a different encoding on your filesystem. It may also be that Swinsian is not exporting with the correct/matching encoding.

Furthermore, it looks like you're exporting from a Mac and importing into Windows. Bob recently made me aware that Mac actually uses a slightly different version of UTF8, so it's also entirely possible that Swinsian is using that UTF8Mac variant which would need to be translated when importing into Windows.

TLDR: Swinsian is probably messing up the encoding, or Mac/Window interoperability issue.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2618
Re: M3U8 playlist import garbles UTF-8
« Reply #5 on: October 27, 2022, 02:54:07 pm »

A simple test: does this command on Windows find the file or says "file not found" ?
dir "Z:\celtic\Bua\Foscadh ón mBáisteach (A Shelter from the Rain)\07 - Caisleán a' tSléibhe - Bua - Foscadh ón mBáisteach (A Shelter from the Rain).flac"

edit: there are plenty of links talking about this issue:
https://apple.stackexchange.com/a/343509
https://stackoverflow.com/questions/6153345/different-utf8-encoding-in-filenames-os-x
https://developer.apple.com/library/archive/qa/qa1173/_index.html


Logged

javaweasel

  • Member
  • *
  • Posts: 4
Re: M3U8 playlist import garbles UTF-8
« Reply #6 on: October 27, 2022, 04:07:01 pm »

Hi Zybex,

I was reaching the same conclusion while you were posting :)

Yep, it's a case of precomposed vs. decomposed Unicode.

I'm exporting the playlists on MacOS, and opening them on Windows. The problem is that the filenames look the same but under the hood they are very different. For example, on Mac, it's Caisleán. On windows, it's Caisleán. Looks the same when displayed, but it's precomposed vs decomposed Unicode. So I do wind up with a "file not found" error on windows.

Now I to convince windows to convert a Mac á to an á it understands.

I'll chase down the links you provided.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2618
Re: M3U8 playlist import garbles UTF-8
« Reply #7 on: October 27, 2022, 04:24:33 pm »

You can use convmv to convert the m3u on the Mac, or Charlint (Perl) on windows. There are likely many other solutions.

This should let MC find the files, but will not resolve the issue with wrong tags.
Logged

javaweasel

  • Member
  • *
  • Posts: 4
Re: M3U8 playlist import garbles UTF-8
« Reply #8 on: October 27, 2022, 04:38:06 pm »

I'll give convmv a look for the Mac side.

Meanwhile, I did find a windows-based Unicode normalizer called UnicodeConverter.net on Sourceforge, which did the trick. I can now import the complete M3U8 files. Unfortunately, like you predicted, the tags are still messed up. That's a problem for "Fill Properties From Filename" tool.

Consider this issue resolved. Thanks for the help!
Logged
Pages: [1]   Go Up