• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: weird combination! (followup: Form field ignored?!? Weird...)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: weird combination! (followup: Form field ignored?!? Weird...)


  • Subject: Re: weird combination! (followup: Form field ignored?!? Weird...)
  • From: Peter Vandoros <email@hidden>
  • Date: Fri, 26 Sep 2008 11:39:44 +1000

Thanks for that :)

On 26/09/2008, at 11:35 AM, Chuck Hill wrote:


On Sep 25, 2008, at 5:33 PM, Peter Vandoros wrote:

Hi Chuck,

On 26/09/2008, at 4:02 AM, Chuck Hill wrote:
(b) using UTF-8 as the page encoding, by

public class Application extends WOApplication {
...
// ensure UTF-8 is actually used anywhere
static public void updateResponseForUTF8(WOResponse rr) {
    rr.setContentEncoding(_NSUtilities.UTF8StringEncoding);

Unless you are using 5.4.2 or 5.4.3 (can't recall which now, 5.4.3 I think), _NSUtilities.UTF8StringEncoding returns the incorrect "UTF8" string, no hyphen. This can cause the request to think that the encoding has changed ( ! "UTF8".equals("UTF-8")) and it then discards the form values. But with the "multipart/form-data" it then can't recreate them so you get null. My bug notes say, "The hours this has cost me..."


Try using rr.setContentEncoding("UTF-8");


Is this an issue with WO 5.2 and 5.3 or just 5.4?

There are two issues. One, if the encoding gets changed and you are using "multipart/form-data", the form values are lost. Two, UTF-8 is more "proper" than UTF8 and in WO 5.4.x, WO has been moving toward this as a standard.



Will changing usages of UTF8 to UTF-8 cause any issues with WO 5.2 or 5.3? I ask because we have been using _NSUtilities.UTF8StringEncoding in a few places for years now and have not come across this issue, maybe we've just been lucky. I don't want to change anything unless I am certain that this will definitely not break anything. Obviously we are going to test any changes we make, I just wanted your opinion on this.


I don't think there is a practical difference, both seem to work for the time being. UTF-8 is more correct. You just have to be certain to be consistent and just use one of them.

Chuck


-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



Peter Vandoros
Software Engineer
Etech Group Pty Ltd
Level 3/21 Victoria St
Melbourne VIC 3000
Australia

Ph: +61 3 9639 9677
Fax: +61 3 9639 9577
----------------------------------
IMPORTANT: This e-mail message and any attachments are confidential and may be privileged. If received in error, please reply to this message and destroy all copies and any attachments. You should check this message and any attachments for viruses or defects. Our liability is limited to resupplying any affected message or attachments. For more information about Etech Group, please visit us at http://www.etechgroup.com.au .





_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Form field ignored?!? Weird... (From: Ondřej Čada <email@hidden>)
 >Re: Form field ignored?!? Weird... (From: Ondřej Čada <email@hidden>)
 >weird combination! (followup: Form field ignored?!? Weird...) (From: Ondřej Čada <email@hidden>)
 >Re: weird combination! (followup: Form field ignored?!? Weird...) (From: Chuck Hill <email@hidden>)
 >Re: weird combination! (followup: Form field ignored?!? Weird...) (From: Peter Vandoros <email@hidden>)
 >Re: weird combination! (followup: Form field ignored?!? Weird...) (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: weird combination! (followup: Form field ignored?!? Weird...)
  • Next by Date: Re: weird combination! (followup: Form field ignored?!? Weird...)
  • Previous by thread: Re: weird combination! (followup: Form field ignored?!? Weird...)
  • Next by thread: Re: weird combination! (followup: Form field ignored?!? Weird...)
  • Index(es):
    • Date
    • Thread