Marquee not display text went ° is in string

This forum is about all development around libVLC.
chrisS
New Cone
New Cone
Posts: 5
Joined: 18 Dec 2012 03:34

Marquee not display text went ° is in string

Postby chrisS » 18 Dec 2012 03:38

Is there a way to make sure that the marquee text is displaying went a "°" or ascii 176 is in the text?.
Thanks in advance

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Marquee not display text went ° is in string

Postby Jean-Baptiste Kempf » 18 Dec 2012 10:23

How does it display now?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

chrisS
New Cone
New Cone
Posts: 5
Joined: 18 Dec 2012 03:34

Re: Marquee not display text went ° is in string

Postby chrisS » 18 Dec 2012 20:36

It does not display any text at all.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Marquee not display text went ° is in string

Postby Jean-Baptiste Kempf » 19 Dec 2012 12:20

Look in the logs.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

eli13
Blank Cone
Blank Cone
Posts: 25
Joined: 21 May 2012 15:28

Re: Marquee not display text went ° is in string

Postby eli13 » 20 Dec 2012 09:30

I guess:
- You use libVLC on Windows
- You have set the Character Encoding in the project properties to Unicode
- You use std::wstring for strings
- You "somehow" convert the wchar_t from the wstring to a char* that can be passed to the libvlc_marquee_XX functions

I had the same problem first, nothing gets displayed if non-asci chars were used. Solution: Encode the wstring properly to a MultiByte char* and pass that to libvlc, using the 'WideCharToMultiByte' function from windows. Specify UTF-8 as Codepage. Something like this:

Code: Select all

wstring text = L"ööääèè??°°°^^"; int len; int slength = (int)text.length() + 1; len = WideCharToMultiByte(CP_UTF8, 0, text.c_str(), slength, 0, 0, 0, 0); if(len == 0) { // error } char* multiByteChar = new char[len]; WideCharToMultiByte(CP_UTF8, 0, text.c_str(), slength, multiByteChar, len, 0, 0); if(len == 0) { delete[] multiByteChar; // error } return multiByteChar;
Like this I didnt find a char that cant be displayed as overlay-text. Hope that helps.

chrisS
New Cone
New Cone
Posts: 5
Joined: 18 Dec 2012 03:34

Re: Marquee not display text went ° is in string

Postby chrisS » 07 Jan 2013 03:35

Thank you, I will definely give this a try.
In another matter am using Power Basic with a few wrapper functions to make a app that using the vlc.dll
At the moment I'm having issues passing a arguement list to the libvlc_new(vlc_argc, VARPTR(temp(0)))) function, it cause my whole program to crash unless the vlc_agc is set to 0.
I try to get the log working but that means i have to get the arguerment list working also. Unless there a functions that allows me to set the log file and verbose level
Thanks in advance

CaptainBoc
New Cone
New Cone
Posts: 1
Joined: 05 Aug 2013 23:47

Re: Marquee not display text went ° is in string

Postby CaptainBoc » 05 Aug 2013 23:51

I guess:
- You use libVLC on Windows
- You have set the Character Encoding in the project properties to Unicode
- You use std::wstring for strings
- You "somehow" convert the wchar_t from the wstring to a char* that can be passed to the libvlc_marquee_XX functions

I had the same problem first, nothing gets displayed if non-asci chars were used. Solution: Encode the wstring properly to a MultiByte char* and pass that to libvlc, using the 'WideCharToMultiByte' function from windows. Specify UTF-8 as Codepage. Something like this:

Code: Select all

wstring text = L"ööääèè??°°°^^"; int len; int slength = (int)text.length() + 1; len = WideCharToMultiByte(CP_UTF8, 0, text.c_str(), slength, 0, 0, 0, 0); if(len == 0) { // error } char* multiByteChar = new char[len]; WideCharToMultiByte(CP_UTF8, 0, text.c_str(), slength, multiByteChar, len, 0, 0); if(len == 0) { delete[] multiByteChar; // error } return multiByteChar;
Like this I didnt find a char that cant be displayed as overlay-text. Hope that helps.
Absolute legend, tried encoding the wstring to a multibyte char* and now it's displaying perfectly! :)
Thanks man! :)


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 28 guests