Author Topic: BASS_UNICODE flag  (Read 274 times)

martin71

  • Posts: 34
BASS_UNICODE flag
« on: 6 Jun '18 - 10:33 »
Hello everybody,

I don't understand exactly the meaning of BASS_UNICODE.

My OS is Linux Mint, and I use the BASS_UNICODE flag in BASS_StreamCreateFile otherwise it can't play my mp3 files. Is it safe to use this flag in my final application? Does it accept/play all kind of files, also on other operating systems like Windows?

Kind regards,

Martin
« Last Edit: 6 Jun '18 - 12:39 by martin71 »

Ian @ un4seen

  • Administrator
  • Posts: 21329
Re: BASS_UNICODE flag
« Reply #1 on: 6 Jun '18 - 13:26 »
The BASS_UNICODE flag tells BASS that the provided filename is in UTF-16 form. It generally isn't needed as much on Linux because filenames are Unicode (UTF-8) otherwise anyway (unlike on Windows), but it's still useful for .Net, which uses UTF-16. Perhaps you're using .Net?

martin71

  • Posts: 34
Re: BASS_UNICODE flag
« Reply #2 on: 6 Jun '18 - 15:29 »
Hi Ian,

I don't use .NET but most of my files are recorded on Windows and now I play them on Linux. I just discovered that I can check if a file is unicode with BASS_ChannelGetInfo. So I will to use that.

Ian @ un4seen

  • Administrator
  • Posts: 21329
Re: BASS_UNICODE flag
« Reply #3 on: 6 Jun '18 - 17:43 »
Just to clarify, the BASS_UNICODE flag has no relation to the file's content. It is purely about the form of the "filename" parameter, ie. whether that's UTF-16 or UTF-8 (ANSI on Windows). If you are needing to use the BASS_UNICODE flag, then it sounds like the programming language that you are using has UTF-16 strings.