Forum OpenACS Development: Re: special characters in a category name (Oracle)

Collapse
Posted by Brian Fenton on
Hi Alvaro,

yeah, in Oracle, if your database character set is UTF8, some non-ASCII characters will be stored in 2 or more bytes. So if you have a PL/SQL variable defined as CHAR(40), you only have 40 bytes available, not 40 characters. The solution to this in PL/SQL is to declare all your variables as CHAR(40 CHAR) instead of simply CHAR(40). Same for VARCHAR2.

Docs here:
http://68.142.116.68/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#i45647

hope this helps
Brian

Collapse
Posted by Alvaro Rodriguez on
Hi Brian,

I didn't know about this datatype in oracle, I just tested it and it works fine for me.

Thanks,
Alvaro

Collapse
Posted by Gustaf Neumann on
Dear Alvaro,

it would be nice if you could provide a patch + upgrade script that we could apply to oacs-head.

-gustaf neumann

Collapse
Posted by Alvaro Rodriguez on
Dear Gustaf,

That's exactly what I was thinking. I did an independent upgrade script, where do I upload it/add it, I've never done this before.

I also fixed a function in the CR for Oracle, the cr_revision table in Oracle has the field 'filename' and the content_revision.copy function does not copy this column. I was needing that column to use the proc fs::file_copy for my file-storage instance. Would this be a fix to put in head too?

Alvaro