# How to change a code page (character encoding) of a .dwg file before importing it?

 1. [FAQ](/ja/faq)
2. »
3. [.dwg support](/faq/dwg-support)

```
/** \details
```

Sets the DWGCODEPAGE value in the specified OdDbDatabase instance.

```
\param db [in] Database.
\param val [in] Value for DWGCODEPAGE.

\remarks
```

This function provides write access to "Read-Only" system variables. It may be used to bypass non-implemented Drawings functionality or to repair drawings.

```
*/
TOOLKIT_EXPORT void odDbSetDWGCODEPAGE(
OdDbDatabase& db,
OdCodePageId val);
```
