• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The Euro symbol, the 1 byte and charsets!

 
Bob Wheeler
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys and girls,

I recently got nightmares that the US-Dollar will be replaced by the Euro and my application doesn't run smoothly any more, because
I have only 1 byte to save the currency sign. That is fine for the US dollar, even the British pound and the yen, but not the Euro.
I checked the UTF-8 and finally found the ISO-8859-15 charset. And what can I say, I'm in love
But I have to confess, that I didn't have a very close relationship with charsets so far. So people, what about your experience with charsets?
Did you run into problems with users who couldn't use this specified charset (if that is possible.) or other problems?

Thanks for sharing your experience.
cheers
Bob
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bob,

I used charset ISO-8859-1 throughout my application. And I didn't care about the currency sign in the rate field. Just used a String to store it

One good advice: just keep it as simple as possible. And only put your time and effort in the must do things. Because doing more won't give you extra credits, you will only have possible loss of points because there is maybe a flaw in your approach. And there is no requirement for dealing with the currency symbol, so make your life not harder than it already is.

Kind regards,
Roel
 
Bob Wheeler
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:
I used charset ISO-8859-1 throughout my application. And I didn't care about the currency sign in the rate field. Just used a String to store it

One good advice: just keep it as simple as possible. And only put your time and effort in the must do things. Because doing more won't give you extra credits, you will only have possible loss of points because there is maybe a flaw in your approach. And there is no requirement for dealing with the currency symbol, so make your life not harder than it already is.
l

That was fast Thanks for your answer.
Actually I also use a string for the rate field and I also don't check if the currency symbol is part of the string. I guess you are right that we shouldn't care about that, but then again, we have to decide which charset to use and we have to defend that decision. And by using ISO-8859-15 I have an extra reason with the Euro sign. So I'm actually still following the KISS principle.

cheers
Bob
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bob,

My mistake, I wrongly interpreted
Bob Wheeler wrote:I have only 1 byte to save the currency sign.

as you saving the currency sign seperately.

Using charset ISO-8859-15 won't be a problem, because it is just a small change of the ISO-8859-1. But I do have another small remark: you also have to check if your implementation of the java platform supports the charset ISO-8859-15, because it is not a standard charset. Only the default charsets (like ISO-8859-1 and UTF-8) are required to be supported by any implementation of the java platform, the other ones are not.

Kind regards,
Roel

 
Bob Wheeler
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:
Using charset ISO-8859-15 won't be a problem, because it is just a small change of the ISO-8859-1. But I do have another small remark: you also have to check if your implementation of the java platform supports the charset ISO-8859-15, because it is not a standard charset. Only the default charsets (like ISO-8859-1 and UTF-8) are required to be supported by any implementation of the java platform, the other ones are not.

That's a good point against the non-standard charset (I didn't know about that, thanks).
Because this violates the KISS principle , I'll head back to ISO-8859-1 and write about the problem with the Euro symbol in the choices together with its solution.

Thanks and another German beer on you

cheers
Bob
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic