Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mb_internal_encoding(3) [php man page]

MB_INTERNAL_ENCODING(3) 						 1						   MB_INTERNAL_ENCODING(3)

mb_internal_encoding - Set/Get internal character encoding

SYNOPSIS
mixed mb_internal_encoding ([string $encoding = mb_internal_encoding()]) DESCRIPTION
Set/Get the internal character encoding PARAMETERS
o $encoding -$encoding is the character encoding name used for the HTTP input character encoding conversion, HTTP output character encoding conversion, and the default character encoding for string functions defined by the mbstring module. You should notice that the internal encoding is totally different from the one for multibyte regex. RETURN VALUES
If $encoding is set, then Returns TRUE on success or FALSE on failure. In this case, the character encoding for multibyte regex is NOT changed. If $encoding is omitted, then the current character encoding name is returned. EXAMPLES
Example #1 mb_internal_encoding(3) example <?php /* Set internal character encoding to UTF-8 */ mb_internal_encoding("UTF-8"); /* Display current internal character encoding */ echo mb_internal_encoding(); ?> SEE ALSO
mb_http_input(3), mb_http_output(3), mb_detect_order(3), mb_regex_encoding(3). PHP Documentation Group MB_INTERNAL_ENCODING(3)

Check Out this Related Man Page

MB_STRCUT(3)								 1							      MB_STRCUT(3)

mb_strcut - Get part of string

SYNOPSIS
string mb_strcut (string $str, int $start, [int $length = NULL], [string $encoding = mb_internal_encoding()]) DESCRIPTION
mb_strcut(3) extracts a substring from a string similarly to mb_substr(3), but operates on bytes instead of characters. If the cut position happens to be between two bytes of a multi-byte character, the cut is performed starting from the first byte of that character. This is also the difference to the substr(3) function, which would simply cut the string between the bytes and thus result in a malformed byte sequence. PARAMETERS
o $str - The string being cut. o $start - Starting position in bytes. o $length - Length in bytes. If omitted or NULL is passed, extract all bytes to the end of the string. o $encoding -The $encoding parameter is the character encoding. If it is omitted, the internal character encoding value will be used. RETURN VALUES
mb_strcut(3) returns the portion of $str specified by the $start and $length parameters. SEE ALSO
mb_substr(3), mb_internal_encoding(3). PHP Documentation Group MB_STRCUT(3)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

character encoding in Fedora6

Hello, After upgrading the OS from Fedora4 to Fedora6, the firefox view>character encoding doesn't work anymore. None of the foreign characters can be displayed, no matter what character encoding to select. Any suggestions? Thanks, bsky :confused (1 Reply)
Discussion started by: bsky
1 Replies

2. UNIX for Dummies Questions & Answers

File encoding in Unix

1. I have a shell script which creates a file using cat command. How can i find what encoding the file follows (e.g. UTF8, ANSI)? 2. I want to convert that file to PC-ANSI format. How can i achieve that? I am using HP-Unix. (6 Replies)
Discussion started by: ssmallya
6 Replies

3. UNIX for Dummies Questions & Answers

Replacing the last character

Hi , I need to change the last character of the line: ie: input file: (raj, muthu, mani, Output: (raj, muthu, mani); so i need to change the last comma by the closing braces so help me out in the issue. Thanks in advance. (2 Replies)
Discussion started by: ithirak17
2 Replies

4. Shell Programming and Scripting

URL encoding

Hi All, I want to do URL encoding using shell script in my project. I decided that the sed is the correct tool to do this. But I am unable achieve what I wanted using sed. kindly help me to get rid of this. My requirement is , there will be one URL with all special character, spaces etc... ... (8 Replies)
Discussion started by: Vichu
8 Replies

5. SuSE

<92> unknown character when opened with Vi editor in Linux

Hi, One of our applications has this string : xxx ¿ yyyyy We are on Linux Suse and the character set is en_US.UTF-8. Our requirement is to replace this special character ¿ with a space. When we open the file containing this string using VI editor we see the same character as <92> xxx... (10 Replies)
Discussion started by: LinuxTest
10 Replies

6. Shell Programming and Scripting

get the file encoding

Hello! The system is AIX 5.3 Give please command or script to get the file encoding Thanks (2 Replies)
Discussion started by: vinment
2 Replies

7. Shell Programming and Scripting

File Conversion

Hi all, How can i convert a file from one encoding to another? Lets say I have a file which is of utf-8 encoding and I want to convert it to cp875. Can anyone tell me how can I achieve this in shell script? Thanks, Sridhar (2 Replies)
Discussion started by: sridhar_423
2 Replies

8. UNIX for Dummies Questions & Answers

Bash encoding, how to change

Hey guys. The problem is : i need to change encoding (to be more precise UTF-8) or change the language . You see , when i log in , manuals are shown in 'Some symbols' (being written in 'Not English') and its very confusing to work. Please Help :) (3 Replies)
Discussion started by: IdleProc
3 Replies

9. Shell Programming and Scripting

How to find the file encoding and updating the file encoding?

Hi, I am beginner to Unix. My requirement is to validate the encoding used in the incoming file(csv,txt).If it is encoded with UTF-8 format,then the file should remain as such otherwise i need to chnage the encoding to UTF-8. Please advice me how to proceed on this. (7 Replies)
Discussion started by: cnraja
7 Replies

10. Shell Programming and Scripting

How to check string encoding?

I want to check if the string is WINDOWS-1251 or UTF-8 can you help me to find the string encoding??? or maybe to get URL Content-Type charset with wget? this is my function on PHP function check_utf8($str) { $len = strlen($str); for($i = 0; $i < $len; $i++){ $c =... (2 Replies)
Discussion started by: sanantonio7777
2 Replies

11. UNIX for Dummies Questions & Answers

Charsets and encoding details

Hello gurus, I would like to get deep into charset and encoding isse, also tried google it but no luck. Please see bellow My configuration $ locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8"... (1 Reply)
Discussion started by: wakatana
1 Replies

12. UNIX for Dummies Questions & Answers

Determing the encoding of a file

Hi, I am trying to determine the encoding for the file, because to convert to UTF-8, it seems as though I have to know the encoding of the source. Tried this file <filename> give me this: <filename>:data or International Language text Tried to see the locale and this is the output:... (6 Replies)
Discussion started by: MIA651
6 Replies

13. AIX

File enconding and conversion

Hi am not a specialist about file encoding. On an AIX 5.2.0.0, I need to check files encoding and convert somes of them to UTF-8. I've used the following command and i think it said to me that all files are encoded using ISO8859-1 %locale charmap ISO8859-1 I've also used iconv command... (2 Replies)
Discussion started by: Fundix
2 Replies

14. Shell Programming and Scripting

Regex space character

Hi, I have following regex condition, however it does not work with different logs having same visible string.I believe it is because of some difference with space character, is it possible to make it work everywhere. Can someone suggest a better string? /BIND dn=" uid=/ Thanks. (8 Replies)
Discussion started by: susankoperna1
8 Replies

15. Solaris

View file encoding then change encoding.

Hi all!! I´m using command file -i myfile.xml to validate XML file encoding, but it is just saying regular file . I´m expecting / looking an output as UTF8 or ANSI / ASCII Is there command to display the files encoding? Thank you! (2 Replies)
Discussion started by: mrreds
2 Replies