The BeOSJournal. Forum Index The BeOSJournal.
Discussing the news of the BeOS Community.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Programming question (ARGH!!)

 
Post new topic   Reply to topic    The BeOSJournal. Forum Index -> BeOS Problems
View previous topic :: View next topic  
Author Message
lanjoe9
NewBe
NewBe


Joined: 21 Mar 2003
Posts: 7
Location: ¡Ciudad de México, DF, México!

PostPosted: Fri Mar 21, 2003 1:11 am   Post subject: Programming question (ARGH!!) Reply with quote   Next

What's up with all this UTF-8 nonsense?!

"You must make sure you're not splitting a multi-byte character"
Fine, make it unnecessarilly harder for newbie devs, but... HOW DO I MAKE SURE?!! I couldn't find anything anywhere explaining how!!!

Now there's another thing, I thought I had found a way around that problem.
Copying things from a BString into a char array variable.
I tried using the BString's "CopyInto()" function.

Result: "Hiroshi needs to fill this"....
yeah, right!!!!! ¬_¬****************

Is there any other way to do it?

And I have yet another question: Why on earth if there's something on the code that causes a crash, does that thread still keep running until suddenly CRASH, instead of just crashing in THAT point?? Makes bug-hunting a lot harder (you go on commenting instructions from the bottom up... until you found out instruction number two made all the mess). I'm not complaining that the other threads still run after the crash (I've been able to save images after a crash and then exit manually the program without pressing exit, a MULTI threaded program. But actually running the same thread after a crash without saying anything makes bug hunting a lot worse)...
_________________
War is terrorism, a thousand times magnified.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Monni the Cat
Junior Scribe
Junior Scribe


Joined: 28 Sep 2002
Posts: 69
Location: Kaarina, Finland

PostPosted: Sat Mar 22, 2003 9:03 am   Post subject: UTF-8 Reply with quote  Previous Next

I think you need to check some little UTF-8 tutorial, As I have understood, every character in UTF-8 sequence has special byte mask that you can check to be sure that some byte is end of sequence or not. And if the ASCII value is lower than 128, it's not even part of UTF-8 sequence.

UTF-8 is a way to represent more than 256 characters at same time, but downside is that it uses more than 1 byte per character.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ArDrakho
Pencil Pusher
Pencil Pusher


Joined: 01 Mar 2003
Posts: 12
Location: San Antonio Texas

PostPosted: Sat Mar 22, 2003 5:29 pm   Post subject: Reply with quote  Previous Next

quote:
"I think you need to check some little UTF-8 tutorial, ..."

Where is this tutorial? Pease forward a link for related info...thanks!

ArDrakho
Back to top
View user's profile Send private message
lanjoe9
NewBe
NewBe


Joined: 21 Mar 2003
Posts: 7
Location: ¡Ciudad de México, DF, México!

PostPosted: Mon Mar 24, 2003 4:07 am   Post subject: Reply with quote  Previous Next

I don't know exactly what I did but now it stopped crashing and works. I can't save a text file with UTF characters properly yet, though... even though I send everything inside a buffer "as is"..

If you post the link, I promise stop pressing the "any" key whenever you show up in BeShare.

BTW, how's unizone coming up? where can I download it?
_________________
War is terrorism, a thousand times magnified.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
tetsu
NewBe
NewBe


Joined: 24 Mar 2003
Posts: 1
Location: Sweden

PostPosted: Mon Mar 24, 2003 12:03 pm   Post subject: Reply with quote  Previous 

Always start to look in the BeBook icon_smile.gif

Don't know if it was this you wanted, but it will probably get you a better insight of how UTF-8 works

http://bang.dhs.org/be/bebook/The%20Interface%20Kit/2_Responding.html#UTF-8
Back to top
View user's profile Send private message
Post new topic   Reply to topic    The BeOSJournal. Forum Index -> BeOS Problems All times are GMT + 1 Hour
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.4 © 2001, 2002 phpBB Group