Download in Cp1250

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Download in Cp1250

Michal Perutka
Hi,

I need to download a text file encoded in cp1250, but the resulting file
is allways in UTF-8.

stream := (MultiByteFileStream fileNamed: 'TEST.TXT') converter:
CP1250TextConverter new.
html anchor
        callback: [self session returnResponse: (WADocumentHandler
document: stream mimeType: 'text/plain' fileName: 'TEST.TXT') response];
        text: 'Download...'.

Can anybody help me ?

Cheers
Michal

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Download in Cp1250

Philippe Marschall
2007/10/22, Michal Perutka <[hidden email]>:

> Hi,
>
> I need to download a text file encoded in cp1250, but the resulting file
> is allways in UTF-8.
>
> stream := (MultiByteFileStream fileNamed: 'TEST.TXT') converter:
> CP1250TextConverter new.
> html anchor
>         callback: [self session returnResponse: (WADocumentHandler
> document: stream mimeType: 'text/plain' fileName: 'TEST.TXT') response];
>         text: 'Download...'.
>
> Can anybody help me ?

Do you run WAKom or WAKomEncoded*?

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Download in Cp1250

Sebastian Sastre-2
In reply to this post by Michal Perutka
Hi Michal,

        if not mandatory the txt perhaps you can avoid the problem by
downloading it zipped. I've used that for a .txt that was downloaded with
wrong latin characters. Downloading it zipped it conserves encoding. Squeak
has all what is needed to zip things.

        maybe that helps,

Sebastian Sastre
 

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de Michal Perutka
> Enviado el: Lunes, 22 de Octubre de 2007 11:50
> Para: [hidden email]
> Asunto: [Seaside] Download in Cp1250
>
> Hi,
>
> I need to download a text file encoded in cp1250, but the
> resulting file is allways in UTF-8.
>
> stream := (MultiByteFileStream fileNamed: 'TEST.TXT') converter:
> CP1250TextConverter new.
> html anchor
>         callback: [self session returnResponse: (WADocumentHandler
> document: stream mimeType: 'text/plain' fileName: 'TEST.TXT')
> response];
>         text: 'Download...'.
>
> Can anybody help me ?
>
> Cheers
> Michal
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Download in Cp1250

Michal Perutka
In reply to this post by Philippe Marschall
WAKomEncoded39

Philippe Marschall napsal(a):
2007/10/22, Michal Perutka [hidden email]:
  
Hi,

I need to download a text file encoded in cp1250, but the resulting file
is allways in UTF-8.

stream := (MultiByteFileStream fileNamed: 'TEST.TXT') converter:
CP1250TextConverter new.
html anchor
        callback: [self session returnResponse: (WADocumentHandler
document: stream mimeType: 'text/plain' fileName: 'TEST.TXT') response];
        text: 'Download...'.

Can anybody help me ?
    

Do you run WAKom or WAKomEncoded*?

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
  

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Download in Cp1250

Philippe Marschall
That's kind of a problem. Do I see it correctly that your whole
application is utf-8 just this download must be Cp1250? Would it be an
option to have a WAKom running on a different port just for this
download?

Philippe

2007/10/22, Michal Perutka <[hidden email]>:

>
>  WAKomEncoded39
>
>  Philippe Marschall napsal(a):
>  2007/10/22, Michal Perutka <[hidden email]>:
>
>
>  Hi,
>
> I need to download a text file encoded in cp1250, but the resulting file
> is allways in UTF-8.
>
> stream := (MultiByteFileStream fileNamed: 'TEST.TXT') converter:
> CP1250TextConverter new.
> html anchor
>  callback: [self session returnResponse: (WADocumentHandler
> document: stream mimeType: 'text/plain' fileName: 'TEST.TXT') response];
>  text: 'Download...'.
>
> Can anybody help me ?
>
>  Do you run WAKom or WAKomEncoded*?
>
> Cheers
> Philippe
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Download in Cp1250

Michal Perutka
In reply to this post by Sebastian Sastre-2
Sebastian,

thank you for your tip.

Michal

Sebastian Sastre napsal(a):
Hi Michal,

	if not mandatory the txt perhaps you can avoid the problem by
downloading it zipped. I've used that for a .txt that was downloaded with
wrong latin characters. Downloading it zipped it conserves encoding. Squeak
has all what is needed to zip things.

	maybe that helps,

Sebastian Sastre
 

  
-----Mensaje original-----
De: [hidden email] 
[[hidden email]] En nombre 
de Michal Perutka
Enviado el: Lunes, 22 de Octubre de 2007 11:50
Para: [hidden email]
Asunto: [Seaside] Download in Cp1250

Hi,

I need to download a text file encoded in cp1250, but the 
resulting file is allways in UTF-8.

stream := (MultiByteFileStream fileNamed: 'TEST.TXT') converter: 
CP1250TextConverter new.
html anchor
        callback: [self session returnResponse: (WADocumentHandler
document: stream mimeType: 'text/plain' fileName: 'TEST.TXT') 
response];
        text: 'Download...'.

Can anybody help me ?

Cheers
Michal

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
    

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
  

-- 
S pozdravem

Mgr. Michal Perutka

Oddělení informatiky
SRS Brno

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Download in Cp1250

Michal Perutka
In reply to this post by Philippe Marschall
Philippe,

thank you very much. Now it is clear, all text responses are converted
to utf-8 in WAKomEncoded39>>contentsOfResponse:

Cheers
Michal

Philippe Marschall wrote:

> That's kind of a problem. Do I see it correctly that your whole
> application is utf-8 just this download must be Cp1250? Would it be an
> option to have a WAKom running on a different port just for this
> download?
>
> Philippe
>
> 2007/10/22, Michal Perutka <[hidden email]>:
>  
>>  WAKomEncoded39
>>
>>  Philippe Marschall wrote:
>>  2007/10/22, Michal Perutka <[hidden email]>:
>>
>>
>>  Hi,
>>
>> I need to download a text file encoded in cp1250, but the resulting file
>> is allways in UTF-8.
>>
>> stream := (MultiByteFileStream fileNamed: 'TEST.TXT') converter:
>> CP1250TextConverter new.
>> html anchor
>>  callback: [self session returnResponse: (WADocumentHandler
>> document: stream mimeType: 'text/plain' fileName: 'TEST.TXT') response];
>>  text: 'Download...'.
>>
>> Can anybody help me ?
>>
>>  Do you run WAKom or WAKomEncoded*?
>>
>> Cheers
>> Philippe
>> _______________________________________________
>>    
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Download in Cp1250

Philippe Marschall
2007/10/23, Michal Perutka <[hidden email]>:
> Philippe,
>
> thank you very much. Now it is clear, all text responses are converted
> to utf-8 in WAKomEncoded39>>contentsOfResponse:

Yeah, maybe it would be better to not convert responses who have a
content type set different than utf-8.

Cheers
Philippe

> Cheers
> Michal
>
> Philippe Marschall wrote:
> > That's kind of a problem. Do I see it correctly that your whole
> > application is utf-8 just this download must be Cp1250? Would it be an
> > option to have a WAKom running on a different port just for this
> > download?
> >
> > Philippe
> >
> > 2007/10/22, Michal Perutka <[hidden email]>:
> >
> >>  WAKomEncoded39
> >>
> >>  Philippe Marschall wrote:
> >>  2007/10/22, Michal Perutka <[hidden email]>:
> >>
> >>
> >>  Hi,
> >>
> >> I need to download a text file encoded in cp1250, but the resulting file
> >> is allways in UTF-8.
> >>
> >> stream := (MultiByteFileStream fileNamed: 'TEST.TXT') converter:
> >> CP1250TextConverter new.
> >> html anchor
> >>  callback: [self session returnResponse: (WADocumentHandler
> >> document: stream mimeType: 'text/plain' fileName: 'TEST.TXT') response];
> >>  text: 'Download...'.
> >>
> >> Can anybody help me ?
> >>
> >>  Do you run WAKom or WAKomEncoded*?
> >>
> >> Cheers
> >> Philippe
> >> _______________________________________________
> >>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside