logs archiveIRC Archive / Freenode / #php / 2015 / November / 15 / 1
Ripmind
Whenever i use an ä or ö or ü or á in json_encode i get a blank white page
any idea?
php
Ripmind: show
your
code
<3
(Sorry about that)
Ripmind
http://pastie.org/10557281
here u go <3
i get no php error at all
php
Ripmind: I can't reproduce. https://i.imgur.com/wnVNM26.png
Ripmind
i know
i never had this problem either
so what could be the issue?
ah
i think i got it?
Bad_Advice_Cat
Ripmind
i think my file is just not utf8
it's ansi
Bad_Advice_Cat
Ripmind, right click and view source.
Ripmind, do not use ansi.
Didn't you get the PSA to use utf8?!
Ripmind
can i batch change files to utf8?
PSA?
         

Bad_Advice_Cat
Public service announcement.
Ripmind
no :D
Bad_Advice_Cat
Ripmind, batch? For windows? What is it you're really trying to achieve?
Ripmind
nothing. just printing an array with json
Bad_Advice_Cat
JSON is meant to be encoded in utf8.
Ripmind
the file was just messy
it's some really old code of me
easily 3-4 years old
Bad_Advice_Cat
Ripmind, which text editor are you using to write PHP code?
That's no excuse for it to not use utf8.
Ripmind
i was noob back then
thats an excuse
:P
I was just using the winscp interal editor
Bad_Advice_Cat
Ripmind, are you still doing that now?
Ripmind
no, i changed to studio code and saved as utf8
then it worked
php
google.com/search?q=php+editor
Bad_Advice_Cat
I suggest switching to a proper text editor that utilizes PHP.
Ripmind
i am using studio code
derstrom
Try atom (http://atom.io). A bit of a memory hog but it's a really good editor
Bad_Advice_Cat
UTF8 charset, and linux line ending.
php
ew
Use VIM
<3
Ripmind
studio code bases on atom :P
https://code.visualstudio.com/
Bad_Advice_Cat
Ripmind, and you can use the new php array syntax.
instead of typing in: array(), you would type in [] instead.
derstrom
php: only for configuration files ;)
__adrian
lol new syntax
         

Ripmind
wow
php
derstrom: I use vim for everything.
Ripmind
which php version?
__adrian
you do realize the version this "new" syntax was introduced in is now unsupported
Bad_Advice_Cat
Ripmind, like this: https://3v4l.org/7YHbK
__adrian, yeah :(
Ripmind
yes but since when can i use that?
derstrom
php: ugh, I couldn't use it for web development
yes, I've tried
Ripmind
wairt what :D
Bad_Advice_Cat
Use []
It's sexy sexy sexy!
Ripmind
your code is not working
oh
for olde rversion
php
Ripmind
now i understand
Bad_Advice_Cat
:D
Ripmind, be sure your open php tag is <?php and not <?
And we're good to go! :D
php
Bad_Advice_Cat: good advice
dog
Ripmind
i always use <?php
lol
Bad_Advice_Cat
Just making sure. It was my first assumption.
😺
derstrom
php: My favourite screenshot ;-)
php
;)
derstrom
oh, hang on, I thought that was Atom
misleading! ;-)
php
;(
It's vim
<3
derstrom
How do you get the file list on the left?
Bad_Advice_Cat
I was just making sure it wasn't windows notpad.
php
geeksomething
um
NerdTREE
derstrom:
derstrom
OK, that might well make me look at vim some more.
php
I also have a vimrc file with like
999 lines
derstrom: 190 lines of vimrc! https://i.imgur.com/zyO3tED.png
mchelen
whats the vimrc for the side file browser?
« prev 1 2 3 4 next »