Re: Caracters in other languages
On Tue, 08 Jul 2003 10:12:02 +1000, Derek Parnell
<ddparnell at bigpond.com> wrote:
>On Mon, 7 Jul 2003 18:06:38 -0500 (07/08/03 09:06:38)
>, <gertie at visionsix.com> wrote:
>> On 8 Jul 2003, at 8:53, Derek Parnell wrote:
>>> From: <rml at rubis.trix.net>
>>> Hi Euforians;
>>>
<many snips>
>>> For example: =3DE9, =3DE7, =3DE3, =3DE1 and so on.
>> Annoying, isn't it? Mirc does the same.
>>> UC =3D3D repeat(1, 255)
>>> for i =3D3D 1 to length(UC) do
>>> UC[i] =3D3D i
>>> LC =3D3D UC
>>> UC['a'] =3D3D 'A'
>>> UC['b'] =3D3D 'B'
>>> UC['=3DE9'] =3D3D '=3DC9'
>>> LC['A'] =3D3D 'a'
>>> LC['B'] =3D3D 'b'
>>> LC['=3DC9'] =3D3D '=3DE9'
>>> for i =3D3D 1 to length(x) do
>>> x[i] =3D3D Upper(x[i])
>>> --=3D20
>>
>> What is "=3D3D" in all the above, and why the $^& is it there? If =
Topica=20
>> changed some Derek's code to "=3D3D", what other errors were =
introduced?
>>
>I don't know who or what is changing the characters but the '=3Dc9' and =
'=3De9'=20
>are uppercase E-Grave and lowercase E-Grave respectively.
I've finally snapped and wasted the morning writing a little utility
so I can see what people are talking about (not specifically this
post, I mean in general when this happens), try it on the above text:
I will certainly use it myself to filter all code I cut and paste from
the mailing list (and the mailing list archive) in future.
Pete
PS I just KNOW this post will get splatted with =3D3D's!!!
clip.exw:
--
-- When you find an email is covered in =3D3D, =3D20 etc, copy the text
-- to the windows clipboard and run this program.
-- The encodings are stripped and the corrected text is both=20
-- displayed, and placed back on the clipboard.=20
-- Use Alt-F4 to close the window.
-- You can also just leave it running in the background; alt-tab
-- to it and the clipboard & display are automatically updated
include win32lib.ew
constant=20
main=3Dcreate(Window,"Quoted Printable Decode",0,0,0,800,600,0),
mle=3Dcreate(MleText,"",main,5,5,0.99,0.99,0)
sequence hout
hout=3Drepeat(-1,256)
for i =3D 0 to 9 do
hout[i+48]=3Di -- '1'..'9' ['0' is already 0]
end for
for i =3D 10 to 15 do
hout[i+55]=3Di -- 'A'..'F'
hout[i+87]=3Di -- 'a'..'f'
end for
global function qpd(sequence in)=20
-------------------------------------
sequence result
integer k
result=3D{}
k=3D1
while k <=3D length(in) do
if k<length(in)-1=20
and in[k]=3D'=3D'=20
and hout[in[k+1]]!=3D-1=20
and hout[in[k+2]]!=3D-1 then
result&=3Dhout[in[k+1]]*16+hout[in[k+2]]
k+=3D3
else
result&=3Din[k]
k+=3D1
end if
end while
return result
end function
procedure onResizeMain(integer self, integer event, sequence params)
sequence size
if self or length(params) then end if -- suppress warnings
if event=3Dw32HResize then
size =3D getClientRect(main) -- returns {x1,y1,x2,y2}
size[3]-=3Dsize[1]
size[4]-=3Dsize[2]
setCtlSize(mle,size[3]-10,size[4]-10)
end if
if event=3Dw32HPaint then
setIndex(mle,{1,0})
paste(mle)
setText(mle,qpd(getText(mle)))
copy(mle)
end if
setFocus(mle)
end procedure
setHandler(main,{w32HResize,w32HActivate,w32HPaint},routine_id("onResizeM=
ain"))
WinMain(main,Normal)
|
Not Categorized, Please Help
|
|