NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 43 44 45 46 47 … 93 Next »
Working with Character sets...

 
  • 0 Vote(s) - 0 Average
Working with Character sets...
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#1
2007-05-03, 12:21 AM
My ZRename program reads the database and retrieves a 'subtitle' Episode name with an accent grave ( é ) into memory

It saves the character to a text file. The text file is using UTF-8

But when I manipulate the string in the program, like fill text boxes, or popup message boxes, I get the wrong characters. Internally String compares don't work, but if I try to catch it by logging the string compares to a text file, it looks right, because the characters are being reencoded into UTF-8

I realize that VB6 is considered antique now, but from what I read none of the MS languages are UNICODE aware.

Does anyone have suggestions?
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,713
Threads: 767
Joined: Nov 2003
#2
2007-05-03, 12:23 AM
Sorry - I cant tell you anything about VB6's string handling. I've never programmed using it myself.
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#3
2007-05-03, 12:35 AM
sub Wrote:Sorry - I cant tell you anything about VB6's string handling. I've never programmed using it myself.

(Man are you fast...)

I kinda thought that. But I guess you're dealing with something like this now, considering the other thread. At least what would be your approach using your language...?

(Be easy on me...)
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,713
Threads: 767
Joined: Nov 2003
#4
2007-05-03, 12:39 AM
C# pretty much takes care of it, but this can be broken sometimes when I call native Windows APIs if I'm not careful. Most parts of the app are pretty friendly to multibyte character sets. I havnt looked into the cause of the problem mentioned in those couple of threads yet, but have got them on a list to do before the next release - I'm pretty sure it'll just be something related to those specific screens.
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#5
2007-05-03, 04:30 AM
I have a really nasty fix...

It will add a lot of lines of code to get all the characters replaced but here's six that I have forced into my app. I hate it but at least it works.

(Thank God for 'billion cycle per second machines')

txtSubtitle = Replace(txtSubtitle, "é", "é")
txtSubtitle = Replace(txtSubtitle, "è", "è")
txtSubtitle = Replace(txtSubtitle, "ê", "ê")
txtSubtitle = Replace(txtSubtitle, "È", "È")
txtSubtitle = Replace(txtSubtitle, "É", "É")
txtSubtitle = Replace(txtSubtitle, "Ê", "Ê")

I will probably make a ini that will load the two values into an array, and then cycle through the list. But this is not elegant :eek:
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,945
Threads: 956
Joined: May 2006
#6
2007-05-03, 05:10 AM
zehd Wrote:I realize that VB6 is considered antique now, but from what I read none of the MS languages are UNICODE aware.

Does anyone have suggestions?

I had to write some VB6 code to take really old MSDOS OEM code page 437 text and convert it first to Window CP 1252 and finally to UTF and I think that the API function was wideCharToMultiByte

Martin.
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#7
2007-05-03, 07:28 AM
Thanks guys.

Martin, wideCharToMultiByte was bang on. It led me to a really cool code snippet.
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
MixMan
Offline

Posting Freak

Posts: 1,239
Threads: 100
Joined: Oct 2005
#8
2007-05-07, 11:56 AM
MS Forms Control 2.0 for VB6 support unicode if I don't remember wrong
http://support.microsoft.com/kb/224305
Best Regards
MixMan
[SIZE="1"]
Antec Fusion case with Gigabyte GA-MA78GM-SH, AMD X2 4850e, 2GB RAM, AMD780G Onboard graphics. WinTV-PVR 150 MCE (With FM), Twinhan DVB-T, 750GB + 250GB HDD. Windows XP Pro SP3, MCE 2005 Remote, 29" 4:3 monitor and a 47" Philips 9603H LCD[/SIZE]
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  visible="!@hasImage & folder.jpg in Music not working Jaggy 0 1,217 2012-02-10, 10:29 PM
Last Post: Jaggy
  PluginHelper.SetPlayerMetaData(Hashtable args) not working alibert 12 4,659 2011-01-23, 05:33 PM
Last Post: sub
  anyone for working reminders? pBS 7 2,980 2009-07-03, 07:37 PM
Last Post: pBS
  setPopup not working + minimize window question bgowland 5 2,319 2007-12-15, 01:15 AM
Last Post: whurlston
  drawtext with < character pastro 7 2,707 2007-10-22, 05:59 AM
Last Post: whurlston
  IMenuTask and IEventNotification not working well together since 0.98 psycik 5 2,177 2006-10-01, 05:27 PM
Last Post: sub
  Weather Plugin SI units not working Paul Gordash 6 2,266 2006-03-23, 02:09 AM
Last Post: fla
  Anyone got IVideoPlugin working? jorm 6 2,418 2005-11-21, 11:33 AM
Last Post: jorm
  Who Working on What? darrin75 7 2,772 2005-01-19, 04:18 AM
Last Post: oakleeman
  Anyone working On Any Video plugins darrin75 5 2,649 2005-01-05, 10:19 PM
Last Post: reven

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode