ineeee / Taigabot

taiga irc bot
GNU General Public License v3.0
4 stars 7 forks source link

py2 unicode/encode/decode leftovers #27

Open ineeee opened 2 years ago

ineeee commented 2 years ago

theres some encoding stuff throwing errors in some plugins TODO write a proper issue

the intros that had unicode get casted to bytes in the b'<str>' format and intros remove ", ' so we end up with a b at the start. adrift told me about this in 4chan urls <Taigabot> b'/wg/ - Formula 1 Posters - Wallpapers/General - 4chan' - posted by FlipAnon !!/Hjft3I79Dx : b'Starting with 2022 posters'. it happens because most of the old code is wrapped in u"" or in str.encode('utf-8')

<ine> .intro
<Taigabot> No greeting saved for ine.
<ine> .intro enis
-Taigabot- Saved your greeting.
<ine> .intro
<Taigabot> ine: benis 
5:41 <fobby> Bloom maybe its just some but I see me and catatafishe's intro has a b at the start
15:41 <fobby> .intro
15:41 <Taigabot> fobby: bdo kegels now 
15:42 <+bloom> .intro
15:42 <Taigabot> bloom: https://i.imgur.com/1loNgj6.jpg 
15:42 [ http://navi:31337/2hOv ]
15:42 <+bloom> ¯\_(ツ)_/¯
15:42 <fobby> WEIRD
15:42 <fobby> Ok
15:42 <+bloom> i will check src
15:42 <fobby> I will adapt
15:42 <fobby> .intro utt
15:42 <fobby> .intro
15:42 <Taigabot> fobby: butt 
15:42 <+bloom> based af
15:42 <fobby> :)
ineeee commented 2 years ago

fixed the 4chan one in fbcd3e9a98ddee70d250e5b9f3273eb412fa951d

edit: also in 66ebc6d627bde5a7294cd0143a71f5c053d69498

ineeee commented 2 years ago

<kiwi_99> the b is for bug