AOLserver Chat Logs

2007/10/29

IRC [00:19] *** holycow parted the chat.
IRC [00:22] *** holycow joined the chat.
IRC [02:02] *** cacrus joined the chat.
IRC [02:49] *** CIA-36 parted the chat.
IRC [03:13] *** CIA-37 joined the chat.
IRC [04:37] *** holycow parted the chat.
IRC [04:42] *** cacrus parted the chat.
IRC [06:21] *** partymola joined the chat.
IRC [07:03] *** cacrus joined the chat.
IRC [07:12] *** cacrus parted the chat.
IRC [07:12] *** cacrus joined the chat.
IRC [07:54] *** partymola_ joined the chat.
IRC [07:58] <cacrus> anyone here ? who can help me with encoding and aolserver ? i am not getting the text displayed properly ,
IRC [08:03] <partymola_> :-m
IRC [08:03] <partymola_> are you putting the proper encoding in the html header?
IRC [08:04] *** partymola parted the chat.
IRC [08:06] <cacrus> Yes
IRC [08:07] <cacrus> this is what i have
IRC [08:07] <cacrus> ns_param urlcharset UTF-8
IRC [08:07] <cacrus> ns_param outputcharset UTF-8
IRC [08:07] <cacrus> ns_param DefaultCharset utf-8
IRC [08:07] <cacrus> ns_param HttpOpenCharset utf-8
IRC [08:07] <cacrus> ns_param PreferredCharsets { utf-8 }
IRC [08:07] <cacrus> ns_param inputcharset utf-8
IRC [08:07] <cacrus> i have oracle database utf8
IRC [08:08] <partymola> ok, let me see
IRC [08:08] <partymola> i had some minor problems too
IRC [08:08] <cacrus> the data from database appears fine , but the content in the .adp files is not appearing
IRC [08:08] <partymola> ns_param OutputCharset utf-8;
IRC [08:08] <partymola> ns_param URLCharset utf-8;
IRC [08:08] <partymola> ns_param PreferredCharsets { utf-8 };
IRC [08:08] <partymola> i hvae that
IRC [08:08] <partymola> :m
IRC [08:09] <partymola> let me check adp files encoding
IRC [08:09] *** cacrus parted the chat.
IRC [08:09] *** cacrus joined the chat.
IRC [08:09] <partymola> i have same config at you
IRC [08:09] <partymola> seems that problem is at adp files
IRC [08:09] <partymola> let me check them
IRC [08:10] <partymola> my files adp files have iso-8869-1 encoding
IRC [08:10] <partymola> sorry, iso-8859-1
IRC [08:10] <cacrus> how can u tell that ?
IRC [08:10] <cacrus> my files are all utf-8
IRC [08:10] <partymola> [xel@beast /datos/simpleoption/subv/proyectos/smith/public-branches/1.0/pages]$ file ./
IRC [08:10] <partymola> ./: ISO-8859 C++ program text
IRC [08:11] <partymola> but, well
IRC [08:11] <partymola> the trick is:
IRC [08:11] <partymola> i have aolserver config telling it's utf-8
IRC [08:11] <partymola> the html header says it's utf-8
IRC [08:11] <partymola> and the adp is iso-8859-1
IRC [08:11] <partymola> but content is served perfectly
IRC [08:11] <cacrus> let me cehck my file
IRC [08:11] <partymola> vowels with accents, spanish characters, etc.
IRC [08:12] <partymola> i know it's weird, but it works :S
IRC [08:12] <partymola> maybe Dossy could explain how and why :)
IRC [08:12] <cacrus> i ran file commadn on one of my file , it does not show encoding
IRC [08:13] <partymola> what does it say? O_o
IRC [08:13] <cacrus> file template.adp
IRC [08:13] <cacrus> template.adp: exported SGML document text
IRC [08:14] <partymola> check the settings of the text editor you're using
IRC [08:14] <Dossy> ?
IRC [08:14] <partymola> sure it says the encoding it's using when writing files
IRC [08:15] <cacrus> its utf-8
IRC [08:15] <cacrus> we use eclipse and its set to utf-8
IRC [08:15] <partymola> cacrus: try saving as iso-8859-1
IRC [08:15] <partymola> Dossy: encoding problems when serving files
IRC [08:15] <cacrus> yes
IRC [08:16] <partymola> i have had this since always, but i got the way to workaround the problem, so I didn't even notified it lol
IRC [08:16] <Dossy> yeah, encoding is not easy.
IRC [08:16] <Dossy> there's no "simple answer" -- it all depends on where your encoding problem is being introduced
IRC [08:16] <partymola> to get everything working, what i do is set everything to utf-8, except that the adp files on disk must use iso8859-1
IRC [08:16] <Dossy> and that could be in many places, depending on how your app is structured
IRC [08:17] <cacrus> I infact did the whole thing utf-8 , we save fiels in utf-8 in eclipse
IRC [08:17] <cacrus> this is the only thing which is different .
IRC [08:17] <partymola> cacrus: convert an adp to iso8859-1 with iconv -f utf-8 -t iso8859-1 input-file.adp > output-file.adp
IRC [08:18] <cacrus> ye sthats what i am doing :)
IRC [08:18] <partymola> and watch if aolserver serves the output file correctly
IRC [08:19] <cacrus> iconv: illegal input sequence at position 96
IRC [08:19] <cacrus> :)
IRC [08:19] <cacrus> let me save it in eclipse in a different format
IRC [08:19] <partymola> yes
IRC [08:19] <partymola> anyways, that's weird
IRC [08:20] <partymola> you say with -f utf-8 that input is in utf-8 format... so if input sequence is incorrect, i means the input is not utf-8 actually
IRC [08:21] <cacrus> how do i get the current encoding of file
IRC [08:21] <partymola> i usually do using "file"
IRC [08:22] <partymola> cut a piece where appear special characters
IRC [08:22] <partymola> save it as a new file with the same editor
IRC [08:22] <partymola> and do a "file" on that file
IRC [08:22] <partymola> and there's a chance it'll give you the encoding of it, instead of the file type
IRC [08:22] <partymola> anyways, file is statistical, so it's not always 100% accurate
IRC [08:25] <cacrus> ok saving file in iso-8859-1 still ahs the same issue ,
IRC [08:26] <partymola> damn
IRC [08:26] <cacrus> now i will cut the text which is not appearing , and save it in a file ,
IRC [08:28] <cacrus> Now here is another thing , when i change the nsd/encoding.c file and set all iso8859-1 to utf-8 , these files are appearing file .
IRC [08:28] <cacrus> si this giving you hint ?
IRC [08:29] *** partymola parted the chat.
IRC [08:33] <cacrus> same result : file is not recognizing the encoding
IRC [08:42] <cacrus> Dossy , does that give you any hint ? if i change the encoding.c to utf-8 text appears fine .
IRC [08:47] <cacrus> i mean i change the encoding entries from iso-88591 to utf-8 in the nsd/encoding.c file and recompile aolserver it works fine .
IRC [08:50] *** partymola joined the chat.
IRC [08:51] <Dossy> it probably means you didn't put your ns_param's in the right place? what version of AOLserver are you using?
IRC [08:51] <cacrus> 4.0.10
IRC [08:51] <Dossy> can you email me your config .tcl?
IRC [08:52] <cacrus> ok just a sec
IRC [08:52] <cacrus> ns_section ns/mimetypes
IRC [08:52] <cacrus> ns_param Default text/plain
IRC [08:52] <cacrus> ns_param NoExtension text/plain
IRC [08:52] <cacrus> ns_param .html {text/html; utf-8}
IRC [08:52] <cacrus> ns_param .tcl {text/plain; utf-8}
IRC [08:52] <cacrus> ns_param .adp {text/html; utf-8}
IRC [08:52] <cacrus> ns_param .byt {text/html; utf-8}
IRC [08:52] <cacrus> this was my mime
IRC [08:52] <cacrus> and this is ns/parameters
IRC [08:52] <cacrus> s_param OutputCharset utf-8
IRC [08:52] <cacrus> ns_param HttpOpenCharset utf-8
IRC [08:52] <cacrus> ns_param inputcharset utf-8
IRC [08:53] <cacrus> and this is my server section
IRC [08:53] <cacrus> ns_param urlcharset UTF-8
IRC [08:53] <cacrus> ns_param outputcharset UTF-8
IRC [08:53] <cacrus> ns_param DefaultCharset utf-8
IRC [08:53] <cacrus> ns_param HttpOpenCharset utf-8
IRC [08:53] <cacrus> ns_param PreferredCharsets { utf-8 }
IRC [08:53] <cacrus> ns_param inputcharset utf-8
IRC [08:53] <cacrus> these are the section where i have utf8 defined
IRC [08:54] <Dossy> ok, as far as I know, the stuff in your server section do nothing--you can/should remove those
IRC [08:55] <Dossy> second, the correct string is "utf-8" -- I don't know if it's case sensitive, so replace "UTF-8" with "utf-8"
IRC [08:55] <Dossy> and you're missing URLCharset in the ns/parameters section
IRC [08:55] <cacrus> hmmlet me do this
IRC [08:55] <Dossy> and HttpOpenCharset -- that doesn't do anything
IRC [08:55] <Dossy> and your mime definitions are wrong
IRC [08:56] <Dossy> should be something like: ns_param .html {text/html; charset=utf-8}
IRC [08:56] <Dossy> and, what do you have in your ns/encoding section?
IRC [08:56] <Dossy> er, ns/encodings
IRC [09:01] <cacrus> I dont have any encoding setion
IRC [09:02] <cacrus> what am i suppose to have in ns/encoding section ?
IRC [09:03] <Dossy> look at sample-config.tcl that comes w/ AOLserver
IRC [09:03] <Dossy> you may not need anything
IRC [09:03] <cacrus> ok
IRC [09:03] <Dossy> I think it's for serving static files
IRC [09:05] <cacrus> we do have static files,
IRC [09:06] <cacrus> let me take out all the stuff u mentioned and give it a try
IRC [09:07] <Dossy> taking out stuff shouldn't make a difference. fixing the ns/mimetypes might help
IRC [09:10] <cacrus> i added URLCharset in ns/parameter , and changed ns/mime and restarted , nothing changed , at the moment the file encoding is iso8859-1 , i wil now try with utf-8
IRC [09:14] <Dossy> are these static files?
IRC [09:14] <cacrus> No , these are .adp files
IRC [09:16] <cacrus> i tried with utf-8 encoded file , same result , these are my web server environment variables . export LANG=en_US.utf-8 export NLS_LANG=.UTF8 , i have tried also export NLS_LANG=america_america.UTF8
IRC [09:16] <cacrus> .UTF8 was something that dekoy once found out ,
IRC [09:29] <cacrus> i cut and paste the garbled text an sved in a file
IRC [09:29] <cacrus> it gets detected no as utf-8 witn file command ,
IRC [09:29] <cacrus> but the result is same ,
IRC [09:30] <cacrus> however if i put the same file on the web server where i changed aolserver source file nsd/encoding.c it works fine
IRC [09:35] <Dossy> are you using Oracle?
IRC [09:35] <cacrus> Yes
IRC [09:35] <Dossy> aha.
IRC [09:36] <cacrus> is it a good aha or a bad one :)
IRC [09:36] <cacrus> but seriously , the whole reason i am doing this excercise is to show utf-8 encoded text peroperly without changing the source . as dekoy accomplished ,
IRC [09:37] <Dossy> neither.
IRC [09:37] <cacrus> why the parameters are not taking affect ?
IRC [09:38] <cacrus> i created a static file with this content ns_puts "عربي"
IRC [09:42] <cacrus> olaaaa
IRC [09:42] <cacrus> it worked ,
IRC [09:42] <cacrus> i added ns/encoding ns_param .adp utf-8 , and it worked
IRC [09:46] <Dossy> lol
IRC [09:46] <cacrus> :)
IRC [09:47] <cacrus> thanks for your help
IRC [09:47] <Dossy> my answer is always "start with sample-config.tcl"
IRC [09:47] <Dossy> :)
IRC [09:47] <cacrus> yea , noticed that sample-config.tcl has also changed
IRC [09:47] <cacrus> i noticed as i downloaded the cvs version ,
IRC [09:47] <cacrus> i dont remeber this being like this
IRC [09:49] *** partymola parted the chat.
IRC [09:49] *** partymola joined the chat.
IRC [10:21] <Dossy> so, you're all set now?
IRC [11:19] *** partymola parted the chat.
IRC [11:39] *** holycow joined the chat.
IRC [12:14] *** dekoy joined the chat.
IRC [18:11] *** dekoy parted the chat.
IRC [22:06] *** Dossy parted the chat.
IRC [22:06] *** Dossy joined the chat.