You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Leandro Rodrigo Saad Cruz <le...@ibnetwork.com.br> on 2004/12/02 22:05:50 UTC
[PATCH] setting charset with file uploads
The charset isn't always US-ASCII !
This problem only happens with enctype="multipar/form-data"
(File uploads) and text form fields !
This patch is against NTURBINE_2_4_M1 !
--
Leandro Rodrigo Saad Cruz
InterBusiness Tecnologia e Serviços
IB - www.ibnetwork.com.br
DB - www.digitalbrand.com.br
OJB - db.apache.org/ojb
XINGU - xingu.sf.net
RE: [PATCH] setting charset with file uploads
Posted by Leandro Rodrigo Saad Cruz <le...@ibnetwork.com.br>.
No problem Eric. I may have mixed charset with charencoding, but this is
just tha names of the variables and stuff. The patch works for its
purpose !
Akmal Sarhan. Thanks for your tip !
On Fri, 2004-12-03 at 12:07 +0100, Eric Pugh wrote:
> Humm.. I am afraid I am out of my depth, I possibly too quickly committed Leandro's change, as it looked reasonable to me. I would ask that someone who knows more then I about this to settle this out.
>
> As far as the fix from 2.3, anyone can do the merge, and there are quite a few fixes in 2.3 that need to come over! So step right up and send in a patch with the merges, the help would be gratefully accepted.
>
> The 2.3.x line is an evolutionary upgrade. You should be able to drop a 2.3.x in place of an existing 2.3.x and need no recompiling or property file changes, everything will work.
>
> 2.4 is a revolutionary upgrade. Dropping 2.4 in place of 2.3 will require new configuration settings, new jar dependencies. It also removes a LOT of cruft. Don't use Torque or Stratum? Then you don't have to include the jars. 2.4 is going to be the outcome of moving all the services out of Turbine into fulcrum, leaving a relatively small jar that is just turbine core. This process began in 2.3 with moving Torque to it's own project and will complete with Turbine 2.4.
>
> So when will 2.4 be done? when it's done. I would be happy to have more help on it, it's been a bit of a one man job. I have been using T2.4 Milestone 1 in production quite successfully. With various Fulcrum components being released, it means that T2.4 Milestone 2 is just around the corner.
>
> Eric
>
> > -----Original Message-----
> > From: Akmal Sarhan [mailto:as@byteaction.de]
> > Sent: Friday, December 03, 2004 11:22 AM
> > To: Turbine Users List
> > Subject: Re: [PATCH] setting charset with file uploads
> >
> >
> > Hi,
> >
> > I think you are mixing charset with charencoding. please have a look at
> > the following explanation from www.w3.org concerning this subject:
> > for the time being I solved this issue by putting a charencodingfilter
> > for tomcat to tell it which charencoding to set for the request
> >
> > ####start#####
> > Character sets, coded character sets, and encodings
> > It is important to clearly distinguish between the concepts character
> > set and character encoding.
> >
> > A character set or repertoire comprises the set of characters one might
> > use for a particular purpose be it those required to support Western
> > European languages in computers, or those a Chinese child will learn at
> > school in the third grade (nothing to do with computers).
> >
> > A coded character set is a set of characters for which a unique number
> > has been assigned to each character. Units of a coded character set are
> > known as code points. For example, the code point for the letter in
> > the Unicode coded character set is 225 in decimal, or E1 in hexadecimal
> > notation. (Note that hexadecimal notation is commonly used for
> > identifying such characters, and will be used here.)
> >
> > The character encoding reflects the way these abstract characters are
> > mapped to bytes for manipulation in a computer.
> >
> > This explanation glosses over some of the detailed nomenclature related
> > to encoding. More detail can be found in Unicode Technical Report #17.
> >
> > ###end####
> >
> > on the other hand according to Henning this is already fixed in 2.3.x
> > branch so probably a merge is due ;-) and a clear roadmap from the
> > developers to tell us which direction they are taking at the moment for
> > the next stable release. 2.4.x or 2.3.x or both
> >
> > regards
> >
> > Akmal
> > Am Do, den 02.12.2004 schrieb Leandro Rodrigo Saad Cruz um 22:05:
> > > The charset isn't always US-ASCII !
> > >
> > > This problem only happens with enctype="multipar/form-data"
> > > (File uploads) and text form fields !
> > >
> > > This patch is against NTURBINE_2_4_M1 !
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
RE: [PATCH] setting charset with file uploads
Posted by Eric Pugh <ep...@upstate.com>.
Humm.. I am afraid I am out of my depth, I possibly too quickly committed Leandro's change, as it looked reasonable to me. I would ask that someone who knows more then I about this to settle this out.
As far as the fix from 2.3, anyone can do the merge, and there are quite a few fixes in 2.3 that need to come over! So step right up and send in a patch with the merges, the help would be gratefully accepted.
The 2.3.x line is an evolutionary upgrade. You should be able to drop a 2.3.x in place of an existing 2.3.x and need no recompiling or property file changes, everything will work.
2.4 is a revolutionary upgrade. Dropping 2.4 in place of 2.3 will require new configuration settings, new jar dependencies. It also removes a LOT of cruft. Don't use Torque or Stratum? Then you don't have to include the jars. 2.4 is going to be the outcome of moving all the services out of Turbine into fulcrum, leaving a relatively small jar that is just turbine core. This process began in 2.3 with moving Torque to it's own project and will complete with Turbine 2.4.
So when will 2.4 be done? when it's done. I would be happy to have more help on it, it's been a bit of a one man job. I have been using T2.4 Milestone 1 in production quite successfully. With various Fulcrum components being released, it means that T2.4 Milestone 2 is just around the corner.
Eric
> -----Original Message-----
> From: Akmal Sarhan [mailto:as@byteaction.de]
> Sent: Friday, December 03, 2004 11:22 AM
> To: Turbine Users List
> Subject: Re: [PATCH] setting charset with file uploads
>
>
> Hi,
>
> I think you are mixing charset with charencoding. please have a look at
> the following explanation from www.w3.org concerning this subject:
> for the time being I solved this issue by putting a charencodingfilter
> for tomcat to tell it which charencoding to set for the request
>
> ####start#####
> Character sets, coded character sets, and encodings
> It is important to clearly distinguish between the concepts character
> set and character encoding.
>
> A character set or repertoire comprises the set of characters one might
> use for a particular purpose – be it those required to support Western
> European languages in computers, or those a Chinese child will learn at
> school in the third grade (nothing to do with computers).
>
> A coded character set is a set of characters for which a unique number
> has been assigned to each character. Units of a coded character set are
> known as code points. For example, the code point for the letter à in
> the Unicode coded character set is 225 in decimal, or E1 in hexadecimal
> notation. (Note that hexadecimal notation is commonly used for
> identifying such characters, and will be used here.)
>
> The character encoding reflects the way these abstract characters are
> mapped to bytes for manipulation in a computer.
>
> This explanation glosses over some of the detailed nomenclature related
> to encoding. More detail can be found in Unicode Technical Report #17.
>
> ###end####
>
> on the other hand according to Henning this is already fixed in 2.3.x
> branch so probably a merge is due ;-) and a clear roadmap from the
> developers to tell us which direction they are taking at the moment for
> the next stable release. 2.4.x or 2.3.x or both
>
> regards
>
> Akmal
> Am Do, den 02.12.2004 schrieb Leandro Rodrigo Saad Cruz um 22:05:
> > The charset isn't always US-ASCII !
> >
> > This problem only happens with enctype="multipar/form-data"
> > (File uploads) and text form fields !
> >
> > This patch is against NTURBINE_2_4_M1 !
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: [PATCH] setting charset with file uploads
Posted by Akmal Sarhan <as...@byteaction.de>.
Hi,
I think you are mixing charset with charencoding. please have a look at
the following explanation from www.w3.org concerning this subject:
for the time being I solved this issue by putting a charencodingfilter
for tomcat to tell it which charencoding to set for the request
####start#####
Character sets, coded character sets, and encodings
It is important to clearly distinguish between the concepts character
set and character encoding.
A character set or repertoire comprises the set of characters one might
use for a particular purpose – be it those required to support Western
European languages in computers, or those a Chinese child will learn at
school in the third grade (nothing to do with computers).
A coded character set is a set of characters for which a unique number
has been assigned to each character. Units of a coded character set are
known as code points. For example, the code point for the letter à in
the Unicode coded character set is 225 in decimal, or E1 in hexadecimal
notation. (Note that hexadecimal notation is commonly used for
identifying such characters, and will be used here.)
The character encoding reflects the way these abstract characters are
mapped to bytes for manipulation in a computer.
This explanation glosses over some of the detailed nomenclature related
to encoding. More detail can be found in Unicode Technical Report #17.
###end####
on the other hand according to Henning this is already fixed in 2.3.x
branch so probably a merge is due ;-) and a clear roadmap from the
developers to tell us which direction they are taking at the moment for
the next stable release. 2.4.x or 2.3.x or both
regards
Akmal
Am Do, den 02.12.2004 schrieb Leandro Rodrigo Saad Cruz um 22:05:
> The charset isn't always US-ASCII !
>
> This problem only happens with enctype="multipar/form-data"
> (File uploads) and text form fields !
>
> This patch is against NTURBINE_2_4_M1 !
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: [PATCH] setting charset with file uploads
Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
Leandro Rodrigo Saad Cruz <le...@ibnetwork.com.br> writes:
>--=-L7+qiUfZ7d/r3qlO4Byw
>Content-Type: text/plain; charset=ISO-8859-1
>Content-Transfer-Encoding: 8bit
>The charset isn't always US-ASCII !
Yep. Look at the Turbine 2.3 branch; I committed a similar patch which allows
the setting of the charset a few days ago.
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH
hps@intermeta.de +49 9131 50 654 0 http://www.intermeta.de/
RedHat Certified Engineer -- Jakarta Turbine Development -- hero for hire
Linux, Java, perl, Solaris -- Consulting, Training, Development
What is more important to you...
[ ] Product Security
or [ ] Quality of Sales and Marketing Support
-- actual question from a Microsoft customer survey
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org