user71040: I would like to replace utf8 characters to byte values for easier character display handling.
The actual replacement table comes from the lcd datasheet therefore it is not utf8 to ascii conversion. Hence I would like to define some macros, where I put the utf8 character, and it returns some matching hex code.
Here is the bare minimum code:
#define IV('┌') 0xC9
#define IV('°') 0xB2

char line0[4] = {0xC9, '4', 0xB2, 0}; // works
char line1[4] = {IV('┌'), '4', IV('°'), 0}; // do not work

void setup() {}
void loop() {}

It does not compile and I must be missing something obvious or rather basic.
Any help is much appreciated.

user4143: #define IV('┌') 0xC9

That really isn't how macros work. What goes in the brackets is a named parameter that is then used in the body of the macro. You can't have multiple macros named the same like that.
The simplest thing to do is just make a set of macros named after what the character is.  For example:
#define CHR_DEGREE 0xc9
#define CHR_BOX_TL 0xB2

char line1[4] = {CHR_BOX_TL, '4', CHR_DEGREE, 0};


71040: <p>I would like to replace utf8 characters to byte values for easier character display handling.
The actual replacement table comes from the lcd datasheet therefore it is not utf8 to ascii conversion. Hence I would like to define some macros, where I put the utf8 character, and it returns some matching hex code.</p>
<p>Here is the bare minimum code:</p>
<pre><code>#define IV('┌') 0xC9
#define IV('°') 0xB2

char line0[4] = {0xC9, '4', 0xB2, 0}; // works
char line1[4] = {IV('┌'), '4', IV('°'), 0}; // do not work

void setup() {}
void loop() {}
</code></pre>
<p>It does not compile and I must be missing something obvious or rather basic.
Any help is much appreciated.</p>
 4143: <pre class="lang-cpp prettyprint-override"><code>#define IV('┌') 0xC9
</code></pre>
<p>That <em>really</em> isn't how macros work. What goes in the brackets is a named parameter that is then used in the body of the macro. You can't have multiple macros named the same like that.</p>
<p>The simplest thing to do is just make a set of macros named after what the character is.  For example:</p>
<pre class="lang-cpp prettyprint-override"><code>#define CHR_DEGREE 0xc9
#define CHR_BOX_TL 0xB2

char line1[4] = {CHR_BOX_TL, '4', CHR_DEGREE, 0};
</code></pre>
