TBDev Forum
Programming board
Main Page Forum Rules Privacy Policy Members Contact Us
Welcome Guest (Login | Register)
TBDev Forum TBDev.net Miscellany Charset's

Charset's

2006-07-30 02:21:00
Group: Member
Posts: 41
Topics participated: 17
Topics started: 5
First post: 2006-07-04 19:38:00
Last post: 2007-10-03 13:24:00
ok looking for someone clever to maybe help me understand this

the tracker uses latin1 charset

but if i change it to utf8 as in all the tables and everything

the hash that is sent out to confirm a new user isnt found and it is not the same as the one in the database?

any ideas on why??

thx
 
2006-07-30 11:13:00
Group: Member
Posts: 2312
Topics participated: 1240
Topics started: 124
First post: 2006-02-25 21:12:00
Last post: 2009-01-03 14:56:00
This might be interesting to you:

 
2006-07-30 11:16:00
Group: Member
Posts: 41
Topics participated: 17
Topics started: 5
First post: 2006-07-04 19:38:00
Last post: 2007-10-03 13:24:00
sprry double post wont happen again

see below
 
2006-07-30 16:33:00
Group: Member
Posts: 41
Topics participated: 17
Topics started: 5
First post: 2006-07-04 19:38:00
Last post: 2007-10-03 13:24:00
what would be wrong with changing

function mksecret to

function mksecret($len = 20) {
 
2006-07-30 18:11:00
Group: Member
Posts: 2312
Topics participated: 1240
Topics started: 124
First post: 2006-02-25 21:12:00
Last post: 2009-01-03 14:56:00
Nothing much...infact it's probally better than the original ;)
 
2006-07-30 18:16:00
Group: Member
Posts: 510
Topics participated: 277
Topics started: 5
First post: 2006-03-13 22:18:00
Last post: 2006-10-25 20:54:00
his will make the secret normal chars is there anything wrong with doing it this way as exporting the database would'nt curupt the passwords?

Nothing much, but i don't like the approach for typing that abcdef... yourself, PHP has a function for it. And why not just use something like
substr( md5(uniqid(mt_rand())), 0, 20)


Would only give you a-f and 0-9 and still gives you 20 chars back since the md5 would give 32 the substring is needed. No while loop needed, valid characters, no weird $chr = 'abcd' string needed.
 
2006-07-30 18:17:00
Group: Member
Posts: 41
Topics participated: 17
Topics started: 5
First post: 2006-07-04 19:38:00
Last post: 2007-10-03 13:24:00
ok thx i just been messing around with this and the passwords dont curupt at all :)

function mksecret($len = 20) {
 

Similar threads

Topic Posts Last post
No similar threads