0

There used to be support for an encoding option called utf-8-mac with iconv in the Terminal. It's mentioned in this forum several times. I used to use it a lot. Now with the following command (that used to work):

iconv -f utf-8-mac -t CP1252 infile.m3u > outfile.m3u

I get:

iconv: conversion to utf-8-mac unsupported

I tried an encoding called mac but that does not work either.

A clumpsy workaround in my case is to open in TextEdit, duplicate and save using Windows Latin 1 encoding. But I'd really prefer using iconv, but I don't know what to look for and there are many encodings. Is there an equivalent to utf-8-mac?

Currently I use: macOS 10.14.6

7
  • Have you tried another input file? utf to a simple code page might not work in all cases if there are unicode characters that can't be converted
    – mmmmmm
    Sep 15, 2022 at 22:42
  • Sorry I don't understand what you mean, iconv itself says utf-8-mac is unsupported. Using utf-8 does not work if that's what you mean.
    – Oortone
    Sep 16, 2022 at 16:46
  • There can be things in a utf file that cannot be converted to a code page. iconv then errors out with a message. So I think there is something in your input file that cannot be converted.
    – mmmmmm
    Sep 16, 2022 at 16:49
  • Also the command line says the input is utf-8-mac but the error message says that is the output - are you sure you have the correct error message and command line
    – mmmmmm
    Sep 16, 2022 at 16:50
  • Yes, that's a strange error message but I get the same with any made upp rubish-encoding name. The line following says iconv: try 'iconv -l' to get the list of supported encodings and utf-8-mac is not listed, so it's definitely gone as an option. Perhaps also I didn't make it clear this used to work with similar file using utf-8-mac so I need to find an alternative doing the same thing. I still have files with this encoding.
    – Oortone
    Sep 16, 2022 at 19:17

1 Answer 1

1

The order in my PATH variable didn't point to the most current and/or adequate version of iconv.

After making sure I use the version found in /usr/bin/ everything works as expected (as pointed out by @mmmmmm).

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .