.\" Process this file with .\" groff -man -Tascii cryptday.1 .\" .TH js_get_encode 3 "August 2000" JS "js library reference" .\" We don't want hyphenation (it's too ugly) .\" We also disable justification when using nroff .hy 0 .if n .na .SH NAME js_get_encode \- determine the encoding that a given js_string object uses .SH SYNOPSIS .nf .B #include "JsStr.h" .sp .B "int js_get_encode(js_string *js);" .fi .SH DESCRIPTION .B js_get_encode determines the encoding that a given .B js_string object uses. You can use this function to see if the encoding of a .B js_string object is ASCII or BINARY. Eventually, this function will allow you to see encodings such as UNICODE-3, ISO 8859-1, etc. .SH ARGUMENTS .B js is a pointer to the .B js_string object that you wish to view the encoding of. .SH EXAMPLE The following example code creates a .B js_string object, sets the encoding to ASCII, then gets the value of the encoding. .nf js_string *foo; int encode; foo = js_create(256,1); js_set_encode(foo,JS_US_ASCII); encode = js_get_encode(foo); .fi .SH "RETURN VALUE" .B js_get_encode returns .I JS_BINARY for binary data, .I JS_US_ASCII for data encoded in US ASCII format, and .I JS_ERROR if it is not able to get the encoding for the .B js_string object. .SH AUTHOR Sam Trenholme <kiwi-zttfryb@koala.samiam.org>