utf-8 encoding

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

utf-8 encoding

Matthew Conway
I'm trying to get xwiki/utf-8/postgres working and ran into a couple  
of snags.
I added some comments to http://www.xwiki.org/xwiki/bin/view/Dev/ 
CharactersSets

In there I mentioned that it should be safe to not set the content  
length on the response as the http protocol (1.1 anyway) defaults to  
using chunked encoding if there is no content length set.  This way  
you get the performance benefits of keepalive, without setting the  
content length.

The code should probably be changed in the repository to remove this  
line, or at the very least have a xwiki.cfg setting for it.

Comments?

Matt




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: utf-8 encoding

Ludovic Dubost

How about calculating the real size for UTF-8 and having a setting to
set or not the content-length..

Ludovic

Matthew Conway wrote:

> I'm trying to get xwiki/utf-8/postgres working and ran into a couple  
> of snags.
> I added some comments to http://www.xwiki.org/xwiki/bin/view/Dev/ 
> CharactersSets
>
> In there I mentioned that it should be safe to not set the content  
> length on the response as the http protocol (1.1 anyway) defaults to  
> using chunked encoding if there is no content length set.  This way  
> you get the performance benefits of keepalive, without setting the  
> content length.
>
> The code should probably be changed in the repository to remove this  
> line, or at the very least have a xwiki.cfg setting for it.
>
> Comments?
>
> Matt
>
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>  

--
Ludovic Dubost
XPertNet: http://www.xpertnet.fr/
Blog: http://www.ludovic.org/blog/
XWiki: http://www.xwiki.com
Skype: ldubost AIM: nvludo Yahoo: ludovic




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: utf-8 encoding

Matthew Conway

On Aug 31, 2005, at 4:31 PM, Ludovic Dubost wrote:


How about calculating the real size for UTF-8 and having a setting to set or not the content-length..

Actually, isn't the content length always going to be the number of bytes, regardless of what encoding is being used?

content.getBytes().length

Matt



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: utf-8 encoding

Ludovic Dubost

Yes.. that might do it..

Ludovic

Matthew Conway wrote:

>
> On Aug 31, 2005, at 4:31 PM, Ludovic Dubost wrote:
>
>>
>> How about calculating the real size for UTF-8 and having a setting to
>> set or not the content-length..
>
> Actually, isn't the content length always going to be the number of
> bytes, regardless of what encoding is being used?
>
> content.getBytes().length
>
> Matt
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>  

--
Ludovic Dubost
XPertNet: http://www.xpertnet.fr/
Blog: http://www.ludovic.org/blog/
XWiki: http://www.xwiki.com
Skype: ldubost AIM: nvludo Yahoo: ludovic




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: utf-8 encoding

Matthew Conway

In fact it does - just tried it on UNICODE mysql/xwiki setup and the  
cont length was correct - no truncation on a page that does get  
truncated when using content.getLength().
If you wouldn't mind making that change in the repository, i would  
save me having to patch every time I upgrade :)  Thanks,

Matt


On Aug 31, 2005, at 7:33 PM, Ludovic Dubost wrote:

>
> Yes.. that might do it..
>
> Ludovic
>
> Matthew Conway wrote:
>
>>
>> On Aug 31, 2005, at 4:31 PM, Ludovic Dubost wrote:
>>
>>
>>>
>>> How about calculating the real size for UTF-8 and having a  
>>> setting to set or not the content-length..
>>>
>>
>> Actually, isn't the content length always going to be the number  
>> of bytes, regardless of what encoding is being used?
>>
>> content.getBytes().length



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: utf-8 encoding

Ludovic Dubost

How about creating a user account on the ObjectWeb forge and we give you
commit rights

Ludovic

Matthew Conway wrote:

>
> In fact it does - just tried it on UNICODE mysql/xwiki setup and the  
> cont length was correct - no truncation on a page that does get  
> truncated when using content.getLength().
> If you wouldn't mind making that change in the repository, i would  
> save me having to patch every time I upgrade :)  Thanks,
>
> Matt
>
>
> On Aug 31, 2005, at 7:33 PM, Ludovic Dubost wrote:
>
>>
>> Yes.. that might do it..
>>
>> Ludovic
>>
>> Matthew Conway wrote:
>>
>>>
>>> On Aug 31, 2005, at 4:31 PM, Ludovic Dubost wrote:
>>>
>>>
>>>>
>>>> How about calculating the real size for UTF-8 and having a  setting
>>>> to set or not the content-length..
>>>>
>>>
>>> Actually, isn't the content length always going to be the number  of
>>> bytes, regardless of what encoding is being used?
>>>
>>> content.getBytes().length
>
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>  

--
Ludovic Dubost
XPertNet: http://www.xpertnet.fr/
Blog: http://www.ludovic.org/blog/
XWiki: http://www.xwiki.com
Skype: ldubost AIM: nvludo Yahoo: ludovic




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: utf-8 encoding

Matthew Conway

On Sep 1, 2005, at 6:33 PM, Ludovic Dubost wrote:


How about creating a user account on the ObjectWeb forge and we give you commit rights

Sounds good.  User = wr0ngway  Thats a zero, not an Oh
I assume I should discuss any changes on here before committing, preferably as a patch file? =)

Thanks,

Matt




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: utf-8 encoding

Ludovic Dubost

We are working on a trust basis.. Trust first, handle problems after..
The rules are to try to never break the build and tests cases (if you
want to be sure rerun the test cases before commiting).
Of course if you are not sure about your changes or that there could be
different point of views, discuss the changes is the best thing to do.
Each change should have a JIRA task associated and can be additionally
discussed here.

And we will prepare a contributor's licence agreement so that people
confirm that their change is on the right licence.
BTW, I'll write in a separate post that we need to change everything to
LGPL.

Ludovic

Matthew Conway wrote:

>
> On Sep 1, 2005, at 6:33 PM, Ludovic Dubost wrote:
>
>>
>> How about creating a user account on the ObjectWeb forge and we give
>> you commit rights
>
> Sounds good.  User = wr0ngway  Thats a zero, not an Oh
> I assume I should discuss any changes on here before committing,
> preferably as a patch file? =)
>
> Thanks,
>
> Matt
>
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>  

--
Ludovic Dubost
XPertNet: http://www.xpertnet.fr/
Blog: http://www.ludovic.org/blog/
XWiki: http://www.xwiki.com
Skype: ldubost AIM: nvludo Yahoo: ludovic




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: utf-8 encoding

Matthew Conway

On Sep 2, 2005, at 3:02 AM, Ludovic Dubost wrote:

>
> We are working on a trust basis.. Trust first, handle problems after..
> The rules are to try to never break the build and tests cases (if  
> you want to be sure rerun the test cases before commiting).
> Of course if you are not sure about your changes or that there  
> could be different point of views, discuss the changes is the best  
> thing to do. Each change should have a JIRA task associated and can  
> be additionally discussed here.
>

Ok, I'll create a JIRA issue (if it doesn't already exist) and commit  
the content length change.  Thanks,

Matt




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: utf-8 encoding

Matthew Conway

On Sep 2, 2005, at 9:43 AM, Matthew Conway wrote:

Ok, I'll create a JIRA issue (if it doesn't already exist) and commit the content length change.  Thanks,

JIRA created, http://jira.xwiki.org/jira/browse/XWIKI-164, code checked in, but I can't seem to close the JIRA report - could just be my lack of knowledge as I've never used JIRA before.  Username wr0ngway in case its a permissions issue.

Matt



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: utf-8 encoding

Ludovic Dubost

It's just that you need to be declared as a developer in JIRA.. This is
done now

Ludovic

Matthew Conway wrote:

>
> On Sep 2, 2005, at 9:43 AM, Matthew Conway wrote:
>>
>> Ok, I'll create a JIRA issue (if it doesn't already exist) and commit
>> the content length change.  Thanks,
>
> JIRA created, http://jira.xwiki.org/jira/browse/XWIKI-164, code
> checked in, but I can't seem to close the JIRA report - could just be
> my lack of knowledge as I've never used JIRA before.  Username
> wr0ngway in case its a permissions issue.
>
> Matt
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>  

--
Ludovic Dubost
XPertNet: http://www.xpertnet.fr/
Blog: http://www.ludovic.org/blog/
XWiki: http://www.xwiki.com
Skype: ldubost AIM: nvludo Yahoo: ludovic




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws