473,396 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Binary values in the database

I'm struggling supporting national characters of different origin in a mixed
environment
using PHP, Perl and Java.

I have a database created with character set UTF-8, but I'm in doubt when
the data is stored
as UTF-8 or latin1-9 then the clients are also doing some automatic
character conversion.

For this reason I need a way to see how the data are stored in the database
without character
conversion.

Any way to see the binary/hexa decimal values ?
Thanks in advance,
Poul
Nov 12 '05 #1
3 1879
Poul,

Just use the HEX function. It displays the data as-is. Works on pretty
much all data types.
Another thing you can do is CAST (c1 AS VARCHAR(100) FOR BIT DATA)
That will pass the data as-is to the client. (Works the other way around
on a parameter marker or host variable as well)

Cheers
Serge
Nov 12 '05 #2
> Another thing you can do is CAST (c1 AS VARCHAR(100) FOR BIT DATA)

Thanks, the hex function works fine.
Can you help me with a proper syntax to the "FOR BIT DATA" for this
statement ?
select name from pmh.test where no = 44

Cheers,
Poul
Nov 12 '05 #3
Poul Møller Hansen wrote:
Thanks, the hex function works fine.
Can you help me with a proper syntax to the "FOR BIT DATA" for this
statement ?
select name from pmh.test where no = 44


select cast(name as <typeofname> FOR BIT DATA) as name from pmh.test
where no = 44

Cheers
Serge
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Johannes | last post by:
Hi, I tried to pack eight integer values and one string into one binary string, which I would like to store in a mysql db. I encountered two problems doing this: 1) $this->packed =...
2
by: Nicholas Sherlock | last post by:
Hey all, I'm tearing my hair out over this one.. I'm using EasyPHP, and trying to write a script which receives binary POST data from a client program of mine. I've put together a simplified...
3
by: David Stockwell | last post by:
Hi, I'd like to read the contents of a file into memory. The problem is that this file is binary. I then want to store the whole thing in memory to a database as a blob. I have no problem...
4
by: Hazzard | last post by:
What is the best way to do this? Binary with 0 representing off and 1 on? Int16 with 1 representing first button, 2 the second, 3 ... varchar with a character values at certain positions in the...
6
by: james | last post by:
I will try to make this short and to the point. I am reading values from a file using a Binary Reader. At a particular address I can get a value of , Hex 10 or Hex 01 . (varies can be 30, 20, 02,03...
3
by: Me Alone | last post by:
Hello: I am trying to edit some C code I found in "The definitive guide to using, programming, and administering MySQL" by Paul DuBois. This C client program connects and then segfaults when...
0
by: zw | last post by:
Hi I have problems displaying binary values on cells on the GUI. The program crashed with following dialog box: "The following exception occurred in the DataGridView:...
4
by: =?ISO-8859-1?Q?Hans_M=FCller?= | last post by:
Good morning folks, I cannot read a binary file into a mysql database. Everything I tried did not succeed. What I tried (found from various google lookups...) is this: con =...
8
by: Bryan.Fodness | last post by:
Hello, I am having trouble writing the code to read a binary string. I would like to extract the values for use in a calculation. Any help would be great. Here is my function that takes in...
5
by: embza | last post by:
currently i have developed a C# application that makes ready structured variables holding binary values to be written into oracle database. The values to be inserted are different. some of them are...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.