# Problem stored values in Oracle

**URL:** <https://www.ruby-forum.com/t/problem-stored-values-in-oracle/150999>\
**Category:** Ruby\
**Created:** [October 15, 2008, 6:49pm UTC](https://www.ruby-forum.com/t/problem-stored-values-in-oracle/150999 "2008-10-15T18:49:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcblues](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/db5fbb/32.png) [@tcblues](https://www.ruby-forum.com/u/tcblues)\
**Post date:** [October 15, 2008, 6:49pm UTC](https://www.ruby-forum.com/t/problem-stored-values-in-oracle/150999/1 "2008-10-15T18:49:54Z")

</div>

If I enter in my website the value Ã©I9Ãq’ÃœnPtâ€¢ the last character is  
replaced on the database by Â¿

The problem is I have to test automatically that the content on the  
database is the same that the content it was entered on the webpage and  
I don’t want to do something easy like replace characters.

Any idea how to solve it in a good way?

Thank you.

---

<div class="post-metadata">

**Author:** ![tcblues](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/db5fbb/32.png) [@tcblues](https://www.ruby-forum.com/u/tcblues)\
**Post date:** [October 17, 2008, 6:10pm UTC](https://www.ruby-forum.com/t/problem-stored-values-in-oracle/150999/2 "2008-10-17T18:10:46Z")

</div>

I found the problem.  
The language of the client and the server were different so I had to  
change the value on the client side in regedit.

thank you.

---

<div class="post-metadata">

**Author:** ![tcblues](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/db5fbb/32.png) [@tcblues](https://www.ruby-forum.com/u/tcblues)\
**Post date:** [October 20, 2008, 9:26am UTC](https://www.ruby-forum.com/t/problem-stored-values-in-oracle/150999/3 "2008-10-20T09:26:52Z")

</div>

2008/10/17 Mario R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> I found the problem.  
> The language of the client and the server were different so I had to  
> change the value on the client side in regedit.

It’s probably also a good idea to check character encoding of the  
database and / or column because that affects how comparisons are done  
and what characters you can store inside.

Kind regards

robert

---

<div class="post-metadata">

**Author:** ![tcblues](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/db5fbb/32.png) [@tcblues](https://www.ruby-forum.com/u/tcblues)\
**Post date:** [October 20, 2008, 11:52am UTC](https://www.ruby-forum.com/t/problem-stored-values-in-oracle/150999/4 "2008-10-20T11:52:51Z")

</div>

How can I check the encoding, encode and decode?

Thanks.

---

<div class="post-metadata">

**Author:** ![tcblues](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/db5fbb/32.png) [@tcblues](https://www.ruby-forum.com/u/tcblues)\
**Post date:** [October 20, 2008, 12:54pm UTC](https://www.ruby-forum.com/t/problem-stored-values-in-oracle/150999/5 "2008-10-20T12:54:18Z")

</div>

2008/10/20 Mario R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> How can I check the encoding, encode and decode?

If the column type is NVARCHAR2 it’s Unicode. For more info, please  
check Oracle’s docs:

[http://download.oracle.com/docs/cd/B19306\_01/server.102/b14200/sql\_elements001.htm#i45685](http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#i45685)

[http://download.oracle.com/docs/cd/B19306\_01/server.102/b14225/ch2charset.htm#NLSPG002](http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/ch2charset.htm#NLSPG002)

Cheers

robert

---

<div class="post-metadata">

**Author:** ![tcblues](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/db5fbb/32.png) [@tcblues](https://www.ruby-forum.com/u/tcblues)\
**Post date:** [October 20, 2008, 12:57pm UTC](https://www.ruby-forum.com/t/problem-stored-values-in-oracle/150999/6 "2008-10-20T12:57:23Z")

</div>

Thanks a lot.
