Thanks Robert and John for the responses. John,
I am reading the database and then creating a file that the user can download onto their computer to import into their Point Of Sale system. I want the POS file to have the (R) character instead. The inventory items (Inventory table) were originally saved with the ® format. So I was trying to save the purchased items in the OrderDetail table with the (R) format. I was having trouble doing that, so what I ended up doing was striping out ® from the product description (from the OrderDetail table) when creating the POS file. This seems to work ok, although their is a little overhead in the conversion. I had initially thought I could encode the variable when writing to the POS file as it did it correctly when displaying to the browser. I think your email explains (second encoding) why it isn't doing this. Thanks Steve -----Original Message----- From: John McGowan [mailto:[EMAIL PROTECTED] Sent: Friday, June 18, 2004 8:32 AM To: [EMAIL PROTECTED] Subject: Re: Witango-Talk: Encoding FYI: Whether or not you set the encoding attribute, characters like the (R) will get encoded anyway as a last step before the content gets sent to the browser. I discovered this while uncovering an encoding bug in the current Witango server. I didn't realize before that there were two steps to the encoding process. Here is a snippet of an email from Phil that explains the 2 step encoding a little better and he specifically mentions what happens to the encoding >There are 2 encodings that happen. First is in the ResultHTML windows. The >second is as the result buffer leaves the server. The "Registered symbol" >is in high ascii so is encoded as the result buffer is sent (see system >variable EncodeResults). > Steve, Are you looking in the database directly to see what is being stored by witango, or are you looking at some output with encoding=none. If you're looking at witango output with encoding=none, the character will still get converted to ® because of that second encoding that happens. /John Robert Shubert wrote: >I would think that storing the $reg; would be what you want, it's >similar to any other html such as <b>. When displaying the contents of >the file, you want to use encoding=none so that the web browser will >turn it back into the (R). I'm not sure if this is an actual high-bit >character or just off the normal chart, but I believe that IE and your >database will always be better handling the ® than the actual >character. You could also try using @REPLACE to turn $reg; into <@CHAR >##> (whatever the ascii value is for a (R)) and then use >encoding=metahtml on the return. > >-----Original Message----- >From: Fogelson, Steve [mailto:[EMAIL PROTECTED] >Sent: Thursday, June 17, 2004 4:10 PM >To: Witango User Group (E-mail) >Subject: Witango-Talk: Encoding > >I am having trouble storing the "registered system" in my DB. It stores >as >® instead of the symbol. I have tried inserting the row with the >following: > ><@var user$ShoppingBasket[<@var request$CurrItem>,P_Name]> as well as ><@var user$ShoppingBasket[<@var request$CurrItem>,P_Name] encoding=none> >as >well as ><@var user$ShoppingBasket[<@var request$CurrItem>,P_Name] >encoding=metahtml> > >It still stores ® > >Is this possible? > >Thanks > >Steve Fogelson >Internet Commerce Solutions >________________________________________________________________________ >TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf > >________________________________________________________________________ >TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf > > > ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
