php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #78872 [ZH] There are some translation errors in the official documentation for pack()
Submitted: 2019-11-27 03:47 UTC Modified: 2020-09-01 06:11 UTC
From: wildcoder1991 at gmail dot com Assigned: avenger (profile)
Status: Closed Package: Translation problem
PHP Version: 7.2.25 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
33 - 9 = ?
Subscribe to this entry?

 
 [2019-11-27 03:47 UTC] wildcoder1991 at gmail dot com
Description:
------------
There is a translation error in the document page of function "pack": 
https://www.php.net/manual/zh/function.pack.php (this is  Chinese Simplified version)

the explanation of paramter "format" in english version is described as below:
"The format string consists of format codes followed by an optional repeater argument. The repeater argument can be either an integer value or * for repeating to the end of the input data. For a, A, h, H the repeat count specifies how many characters of one data argument are taken, for @ it is the absolute position where to put the next data, for everything else the repeat count specifies how many data arguments are consumed and packed into the resulting binary string."

the Chinese Simplified version is described as below:
"format字符串由格式代码组成,后面跟着一个可选的重复参数。 重复参数可以是一个整数值或者*值来重复到输入数据的末尾。对于a, A, h, H格式化代码,其后的重复参数指定了给定数据将会被使用几个字符串,对于@,其后的数字表示放置剩余数据的绝对定位(之前的数据将会被空字符串填充),对于其他所有内容,重复数量指定消耗多少数据并将其打包到生成的二进制字符串中。"

but in actually: it should be:
"format字符串由格式代码组成,后面跟着一个可选的重复参数。 重复参数可以是一个整数值或者*值来重复到输入数据的末尾。对于a, A, h, H格式化代码,此可选重复参数指定了给定的数据参数中的前多少个字符将会被使用,对于@,其后的数字表示放置剩余数据的绝对定位(之前的数据将会被空字符串填充),对于其他所有内容,重复数量指定消耗多少个数据参数并将其打包到生成的二进制字符串中。"



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-11-27 03:54 UTC] requinix@php.net
-Summary: There are some translation errors in the official documentation +Summary: [ZH] There are some translation errors in the official documentation for pack()
 [2020-09-01 06:11 UTC] avenger@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: avenger
 [2020-09-01 06:11 UTC] avenger@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 05:01:29 2024 UTC