I'm having a problem I hope someone can help with.

The Ruby BBS has to receive messages from other BBS systems in old IBM
PC extended ASCII, I believe IBM437.

This always worked fine before ruby 1.9 and datamapper.

Datamapper doesn't want to store them.  I get a regexp validation
error (ASCII-8BIT vs UTF-8)

I've tried converting the encoding to utf-8 thusly:

message.text = message.text.encode( 'UTF-8', 'IBM437' )

This allows the record to be saved, but it messes up the ASCII
characters above 127.

Does anyone know a solution?  This encoding this is a nightmare!

-- 
"I have a feeling that you're riding for some kind of a terrible,
terrible fall.  But I don't honestly know what kind.... It may be the
kind where, at the age of thirty, you sit in some bar hating everybody
who comes in looking as if he might have played football in college.
Then again, you may pick up just enough education to hate people who
say, 'It's a secret between he and I.'  Or you may end up in some
business office, throwing paper clips at the nearest stenographer.  I
just don't know."

 ~Mr. Antolini, The Catcher in the Rye

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to