Lines Matching refs:cp
53 ucbuf_autodetect_fs(FileStream* in, const char** cp, UConverter** conv, int32_t* signatureLength, UErrorCode* error){
64 *cp = ucnv_detectUnicodeSignature(start, numRead, signatureLength, error);
72 if(*cp==NULL){
78 *conv = ucnv_open(*cp,error);
97 static UBool ucbuf_isCPKnown(const char* cp){
98 if(ucnv_compareNames("UTF-8",cp)==0){
101 if(ucnv_compareNames("UTF-16BE",cp)==0){
104 if(ucnv_compareNames("UTF-16LE",cp)==0){
107 if(ucnv_compareNames("UTF-16",cp)==0){
110 if(ucnv_compareNames("UTF-32",cp)==0){
113 if(ucnv_compareNames("UTF-32BE",cp)==0){
116 if(ucnv_compareNames("UTF-32LE",cp)==0){
119 if(ucnv_compareNames("SCSU",cp)==0){
122 if(ucnv_compareNames("BOCU-1",cp)==0){
125 if(ucnv_compareNames("UTF-7",cp)==0){
132 ucbuf_autodetect(const char* fileName, const char** cp,UConverter** conv, int32_t* signatureLength,UErrorCode* error){
137 if(conv==NULL || cp==NULL || fileName==NULL){
149 if(ucbuf_autodetect_fs(in,cp,conv,signatureLength,error)) {
449 ucbuf_open(const char* fileName,const char** cp,UBool showWarning, UBool buffered, UErrorCode* error){
457 if(cp==NULL || fileName==NULL){
480 if(*cp==NULL || **cp=='\0'){
482 ucbuf_autodetect_fs(in,cp,&buf->conv,&buf->signatureLength,error);
483 }else if(ucbuf_isCPKnown(*cp)){
488 buf->conv=ucnv_open(*cp,error);
515 fprintf(stderr, "Could not open codepage [%s]: %s\n", *cp, u_errorName(*error));