php ใช้ iconv('TIS-620','UTF-8', $x_row->U_NAME) แล้ว python ใช้อะไร
เพราะผมต้องการเขียน web ให้ format file ของ code เป็น utf8 แต่ databaser ผมเก็บเป็น
tis-620 ครับ หาโค้ดตัวอย่างยังไม่เจอเลยครับ
Hiring! บริษัทที่น่าสนใจ
Carmen Software
Hotel Financial Solutions
Next Innovation (Thailand) Co., Ltd.
We are web design with consulting & engineering services driven the future stronger and flexibility.
KKP Dime
KKP Dime บริษัทในเครือเกียรตินาคินภัทร
Kiatnakin Phatra Financial Group
Financial Service
Fastwork Technologies
Fastwork.co เว็บไซต์ที่รวบรวม ฟรีแลนซ์ มืออาชีพจากหลากหลายสายงานไว้ในที่เดียวกัน
Thoughtworks Thailand
Thoughtworks เป็นบริษัทที่ปรึกษาด้านเทคโนโยลีระดับโลกที่คว้า Great Place to Work 3 ปีซ้อน
Iron Software
Iron Software is an American company providing a suite of .NET libraries by engineer for engineers.
CLEVERSE
Cleverse is a Venture Builder. Our team builds several tech companies.
Nipa Cloud
#1 OpenStack cloud provider in Thailand with our own data center and software platform.
Bangmod Enterprise
The leader in Cloud Server and Hosting in Thailand.
CIMB THAI Bank
MOVING FORWARD WITH YOU - CIMB is the leading ASEAN Bank
Bangkok Bank
Bangkok Bank is one of Southeast Asia's largest regional banks, a market leader in business banking
MuvMi (Urban Mobility Tech Co.,Ltd.)
Shape the future of urban mobility towards affordable, clean, and safe solutions
T.N. Digital Solution Co., Ltd.
TNDS has been involving in every first move of banking’s major digital transformation.
KBTG - KASIKORN Business-Technology Group
KBTG - "The Technology Company for Digital Business Innovation"
Siam Commercial Bank Public Company Limited
"Let's start a brighter career future together"
Icon Framework co.,Ltd.
Global Standard Platform for Real Estate แพลตฟอร์มสำหรับธุรกิจอสังหาริมทรัพย์ครบวงจร มาตรฐานระดับโลก
REFINITIV
The Financial and Risk business of Thomson Reuters is now Refinitiv
H LAB
Re-engineering healthcare systems through intelligent platforms and system design.
The Gang Technology Co., Ltd.
We're a Digital Agency that helps our customers transform their business into digital with ease.
LTMH
LTMH มุ่งเน้นการพัฒนาผลิตภัณฑ์ที่สามารถช่วยพันธมิตรของเราให้บรรลุเป้าหมาย
Seven Peaks
We Drive Digital Transformation
Wisesight (Thailand) Co., Ltd.
The Best Choice For Handling Social Media · High Expertise in Social Data · Most Advanced and Secure
MOLOG Tech
We are Modern Logistic Platform, Specialize in WMS, OMS and TMS.
Data Wow Co.,Ltd
We enable our clients to realize increased productivity by solving their most complex issues by Data
LINE Company Thailand
LINE, the world's hottest mobile messaging platform, offers free text and voice messaging + Call
LINE MAN Wongnai
Join our journey to becoming No.1 food platform in Thailand
python ก็มี iconv
lew Tue, 09/09/2008 - 14:55
python ก็มี iconv นะครับ
LewCPE
ใช้ unicode
bow_der_kleine Tue, 09/09/2008 - 15:47
ใช้ unicode ซึ่งเป็น builtin class เลยก็ได้ครับ
u = unicode("This is a tis-620 text.", 'tis-620') # เปลี่ยน TIS-620 เป็น UTF-8
t = u.encode('tis-620') # เปลี่ยนกลับ UTF-8 เป็น TIS-620
BioLawCom.De
เพิ่มเติม
bow_der_kleine Tue, 09/09/2008 - 15:55
เพิ่มเติมครับ หากไม่มีความจำเป็นต้องใช้ TIS-620 ผมว่าเปลี่ยนฐานข้อมูลเป็น UTF-8 ให้หมดเลยจะง่ายกว่าครับ เพราะการเปลี่ยน encoding ไปมาก็เสีย performance ไประดับนึงเหมือนกัน
BioLawCom.De
ขอบคุณหลา
preecha13 Tue, 09/09/2008 - 16:43
In reply to เพิ่มเติม by bow_der_kleine
ขอบคุณหลายๆ เด้อครับ
จริงๆแล้วปัญหาของผมอยู่ที่ผมใช้ firebird เป็น database ในการลองเขียนดูครับ
ติดนิสัยมาจากการเขียนโปรแกรมด้วย delphi เพราะ firebird เล็กและทำงานแบบ transaction ได้
copy ตัวดาต้าเบสเก็บไว้ง่ายและสะดวกในการนำมาใช้ทีหลัง
แต่ดันหาตัว database manager ที่จะมาสั่ง sql กับฟิลด์ที่เป็น utf-8
ลำบากนะครับ ยกเว้น http://www.ibwebadmin.net/ ซึ่งเป็น
เป็นแบบ web แต่ไม่สะดวกนะครับแต่ ตอนนี้ผมมีตัวที่ช่วยแก้ปัญหาดังกล่าวได้แล้วครับ
ผมใช้ DbVisualizer-6.0 ในการ query ข้อมูลดูนะครับ แต่พอใช้สร้าง database ใช้
Firebird Maestro แทน ตอนนี้ก็เลยเปลี่ยนมาเก็บข้อมูลแบบ utf-8 ไปเลย
ยุ่งยากนิดหน่อยแต่ก็ ok
มีอีกวิธี
ipats Tue, 09/09/2008 - 19:43
มีอีกวิธีคือ ถ้าใช้ mysql (db เจ้าอื่นไม่รู้ทำได้ไหม) คือเซ็ต connection charset เป็น utf-8 ครับ แล้วเวลาเรียกข้อมูลมันจะแปลงให้เอง ใช้คำสั่ง SET NAMES utf8
---------- iPAtS