<p>These fields are not in general &quot;normal text&quot;. They <em>might</em> be normal text (eg ASCII) or they could also be UTF-8 or UTF-16 or any other encoding.</p>
<p>The most sensible way to view them is as hexadecimal and that is what the <code>psql</code> command line does. Eg:</p>
<pre><code>$ psql cexplorer
psql (14.5 (Debian 14.5-1), server 13.7 (Debian 13.7-0+deb11u1))
Type &quot;help&quot; for help.

cexplorer=# select * from multi_asset limit 1 ; 
 id |                           policy                           |       name       |                 fingerprint                  
----+------------------------------------------------------------+------------------+----------------------------------------------
  1 | \x00000002df633853f6a47465c9496721d2d5b1291b8398016c0e87ae | \x6e7574636f696e | asset12h3p5l3nd5y26lr22am7y7ga3vxghkhf57zkhd
(1 row)
</code></pre>
<p>So it you want something that is guaranteed to be &quot;normal text&quot; you should use the <code>fingerprint</code> field, which is Bech32 encoded.</p>

CC BY-SA 4.0
2022-08-21T22:53:04.270Z
Thank you very much. Is there anyway to do like this on PgAmin?
cdt
CC BY-SA 4.0
2022-08-21T22:55:18.243Z
Sorry, no idea. I have never used `PgAdmin`.
Erik de Castro Lopo
CC BY-SA 4.0
2022-08-21T23:20:50.797Z
Thanks you very much. It is very helpful to me.
cdt
CC BY-SA 4.0
2022-08-21T22:30:22.407Z
2022-08-21T22:30:22.407Z
Erik de Castro Lopo
<p>in your case:</p>
<pre><code>SELECT multi_asset.policy::text human_policy FROM ...
</code></pre>
<p>or</p>
<pre><code>SELECT encode(multi_asset.name::bytea, 'escape'::text) human_name FROM ... 
</code></pre>

CC BY-SA 4.0
2022-08-25T14:23:18.580Z
thanks a lot. For me, it is the easiest way.
cdt
CC BY-SA 4.0
2022-08-22T09:05:04.883Z
2022-08-22T09:19:40.853Z
2022-08-22T09:19:40.853Z
cexplorer.io
<p>When running sql script to view data on Cexplorer database, many times,I see binary data.
for example, multi_asset.name, multi_asset.policy in the following query.</p>
<p><a href="https://i.sstatic.net/68HfE.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/68HfE.png" alt="enter image description here" /></a></p>
<p>Is there any way to view these data in normal text?</p>
<p>Thanks very much.</p>

<cardano-db-sync><policy>
How to view binarydata in cexplorer?
# How to view binarydata in cexplorer?

(Asked by: username_0 on 2022-08-21)

When running sql script to view data on Cexplorer database, many times,I see binary data.
for example, multi\_asset.name, multi\_asset.policy in the following query.

[![enter image description here](https://i.sstatic.net/68HfE.png)](https://i.sstatic.net/68HfE.png)

Is there any way to view these data in normal text?

Thanks very much.

**Tags:** cardano-db-sync, policy

---

## 2 answers

### Answer by username_1 on 2022-08-21. Score: 1

These fields are not in general "normal text". They might be normal text (eg ASCII) or they could also be UTF-8 or UTF-16 or any other encoding.
The most sensible way to view them is as hexadecimal and that is what the psql command line does. Eg:
$ psql cexplorer
psql (14.5 (Debian 14.5-1), server 13.7 (Debian 13.7-0+deb11u1))
Type "help" for help.

cexplorer=# select * from multi_asset limit 1 ; 
 id |                           policy                           |       name       |                 fingerprint                  
----+------------------------------------------------------------+------------------+----------------------------------------------
  1 | \x00000002df633853f6a47465c9496721d2d5b1291b8398016c0e87ae | \x6e7574636f696e | asset12h3p5l3nd5y26lr22am7y7ga3vxghkhf57zkhd
(1 row)

So it you want something that is guaranteed to be "normal text" you should use the fingerprint field, which is Bech32 encoded.

> **Comments:**
> **username_0**: Thank you very much. Is there anyway to do like this on PgAmin?  
> **username_1**: Sorry, no idea. I have never used `PgAdmin`.  
> **username_0**: Thanks you very much. It is very helpful to me.  

---

### Answer by username_2 on 2022-08-22. Score: 1

in your case:
SELECT multi_asset.policy::text human_policy FROM ...

or
SELECT encode(multi_asset.name::bytea, 'escape'::text) human_name FROM ...

> **Comments:**
> **username_0**: thanks a lot. For me, it is the easiest way.  

---

