docs/technotes/guides/jni/spec/design.html

Print this page




 227     native int g(double d);
 228 }</pre>
 229 
 230 <p>We adopted a simple name-mangling scheme to ensure
 231 that all Unicode characters translate into valid C function names.
 232 We use the underscore (&ldquo;_&rdquo;) character as the substitute
 233 for the slash (&ldquo;/&rdquo;) in fully qualified class names.
 234 Since a name or type descriptor never begins with a number, we can
 235 use <code>_0</code>, ..., <code>_9</code> for escape sequences, as the following table illustrates:</p>
 236 
 237 <table border="1" summary="Unicode character translations">
 238 <caption>Unicode Character Translation</caption>
 239 <thead>
 240 <tr>
 241   <th>Escape Sequence</th>
 242   <th>Denotes</th>
 243 </tr>
 244 </thead>
 245 <tr>
 246 <td>
 247 <code>_0XXXX</code>
 248 </td>
 249 <td>
 250 a Unicode character <code>XXXX</code>. Note that lower case is used to represent non-ASCII Unicode characters, for example, <code>_0abcd</code> as opposed to <code>_0ABCD</code>.
 251 </td>
 252 </tr>
 253 <tr>
 254 <td>
 255 <code>_1</code>
 256 </td>
 257 <td>
 258 the character &ldquo;_&rdquo;
 259 </td>
 260 </tr>
 261 <tr>
 262 <td>
 263 <code>_2</code>
 264 </td>
 265 <td>
 266 the character &ldquo;;&rdquo; in
 267 signatures
 268 </td>
 269 </tr>
 270 <tr>




 227     native int g(double d);
 228 }</pre>
 229 
 230 <p>We adopted a simple name-mangling scheme to ensure
 231 that all Unicode characters translate into valid C function names.
 232 We use the underscore (&ldquo;_&rdquo;) character as the substitute
 233 for the slash (&ldquo;/&rdquo;) in fully qualified class names.
 234 Since a name or type descriptor never begins with a number, we can
 235 use <code>_0</code>, ..., <code>_9</code> for escape sequences, as the following table illustrates:</p>
 236 
 237 <table border="1" summary="Unicode character translations">
 238 <caption>Unicode Character Translation</caption>
 239 <thead>
 240 <tr>
 241   <th>Escape Sequence</th>
 242   <th>Denotes</th>
 243 </tr>
 244 </thead>
 245 <tr>
 246 <td>
 247 <code>_0xxxx</code>
 248 </td>
 249 <td>
 250 a Unicode character <code>xxxx</code>, representing characters other than ASCII alphanumeric ([A-Za-z0-9]). Note that lower case is used, for example, <code>_0abcd</code> as opposed to <code>_0ABCD</code>.
 251 </td>
 252 </tr>
 253 <tr>
 254 <td>
 255 <code>_1</code>
 256 </td>
 257 <td>
 258 the character &ldquo;_&rdquo;
 259 </td>
 260 </tr>
 261 <tr>
 262 <td>
 263 <code>_2</code>
 264 </td>
 265 <td>
 266 the character &ldquo;;&rdquo; in
 267 signatures
 268 </td>
 269 </tr>
 270 <tr>