Waraxe IT Security Portal
Login or Register
January 16, 2025
Menu
Home
Logout
Discussions
Forums
Members List
IRC chat
Tools
Base64 coder
MD5 hash
CRC32 checksum
ROT13 coder
SHA-1 hash
URL-decoder
Sql Char Encoder
Affiliates
y3dips ITsec
Md5 Cracker
User Manuals
AlbumNow
Content
Content
Sections
FAQ
Top
Info
Feedback
Recommend Us
Search
Journal
Your Account
User Info
Welcome, Anonymous
Nickname
Password
(Register)

Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9144

People Online:
Visitors: 139
Members: 0
Total: 139
Full disclosure
CVE-2024-48463
CyberDanube Security Research 20250107-0 | Multiple Vulnerabilities in ABB AC500v3
Certified Asterisk Security Release certified-20.7-cert4
Certified Asterisk Security Release certified-18.9-cert13
Asterisk Security Release 22.1.1
Asterisk Security Release 18.26.1
[asterisk-dev] Asterisk Security Release 21.6.1
[asterisk-dev] Asterisk Security Release 20.11.1
Multiple vulnerabilities in CTFd versions <= 3.7.4
IBMi Navigator / CVE-2024-51464 / HTTP Security Token Bypass
IBMi Navigator / CVE-2024-51463 / Server Side Request Forgery(SSRF)
CyberDanube Security Research 20241219-0 | Authenticated Remote Code Execution in Ewon Flexy 205
Stored XSS with Filter Bypass - blogenginev3.3.8
[SYSS-2024-085]: Broadcom CA Client Automation - Improper Privilege Management (CWE-269)
[KIS-2024-07] GFI Kerio Control <= 9.4.5 Multiple HTTP Response Splitting Vulnerabilities
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> Php -> detect encoding of string and convert it to utf8?
Post new topicReply to topic View previous topic :: View next topic
detect encoding of string and convert it to utf8?
PostPosted: Sun Jul 03, 2011 3:04 am Reply with quote
emrag
Regular user
Regular user
Joined: Jun 03, 2004
Posts: 20
Location: TURKEY




mb_detect_encoding doesn't work well. i found this useful code from php.net comments but it's still not reliable. any suggestion about to convert any encoding to ut8?

Code:
function fix_utf8($data)
{
$list = array('utf-8', 'iso-8859-9', 'iso-8859-1', 'windows-1251');

foreach($list as $item)
{
$sample = iconv($item, $item, $data);
if(md5($sample) == md5($data))
{
return iconv($item, 'utf-8', $sample);
}
unset($sample);
}
return null;
}
View user's profile Send private message MSN Messenger ICQ Number
detect encoding of string and convert it to utf8?
www.waraxe.us Forum Index -> Php
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT
Page 1 of 1

Post new topicReply to topic


Powered by phpBB © 2001-2008 phpBB Group



Space Raider game for Android, free download - Space Raider gameplay video - Zone Raider mobile games
All logos and trademarks in this site are property of their respective owner. The comments and posts are property of their posters, all the rest (c) 2004-2024 Janek Vind "waraxe"
Page Generation: 0.048 Seconds