The defendant, Christian, was convicted of the crime of assault with a deadly weapon upon the person of one George Massino, and now appeals from the judgment and order denying his motion for a new trial.
Upon being called to plead to the information, he moved to set it aside upon the ground that he had never been legally committed by a magistrate. And we think the proper disposition of that motion demands a reversal of the judgment. The inception of the present prosecution is founded in a complaint laid before a magistrate upon the oath of one Mck Savage. In that complaint John Doe, alias, is charged with an assault with a deadty weapon upon the person of one George Magin. At the conclusion of the preliminary examination the magistrate entered his order of commitment upon the back of the complaint, reciting that, “ It appearing to me that the offense of an assault with a deadly weapon, to wit, a pistol, has been committed, and that there is sufficient cause to believe that the within named Harry Christian, arrested under the name of John Doe, guilty thereof, I order that he beheld to answer to the same,” etc.
*473The district attorney thereupon filed an information against the defendant, Christian, charging him with the crime of assault with a deadly weapon upon the person of one George Massino, and upon that information he has been tried and convicted. The defendant was not charged by the complaint before the magistrate with assaulting one George’ Massino; neither does the commitment indicate that he was held to answer before the superior court upon that character of charge. There is a wide difference between the offense of an assault with a deadly weapon upon John Doe and that of assault with a deadly weapon upon Bichard Boe. The name of the party assaulted is a material element of the offense, and common justice to the defendant demands that he be notified of the particular offense for which he stands committed. In the present case he had no such notice. If the record gave him any information upon the subject, it would be an inference at least that he was to be tried for the assaulting of one Magin, the party named in the complaint, but it was only when he was called upon to plead that he for the first time became aware of the nature of the offense for which he was to be put to trial. Again, this party was arrested and brought before' a magistrate to defend himself against a charge of assaulting one Magin. Under those circumstances, and under a complaint charging that offense, he could not be called upon to defend himself for assaulting one Massino, for there was no complaint on file upon which to base an examination of that character.
The commitment furnishes the material matters upon which the district attorney should frame his information. If the defendant is committed for trial for the offense charged in the complaint, it is sufficient to so declare in the commitment, but, if he be held for some other offense, the commitment should state its general nature; in other words, describe it with reasonable certainty. The district attorney, in framing his information, must confine himself to the record. He is not justified in placing therein any element of the offense, *474the information of which he has obtained from outside sources. This principle is declared in People v. Parker, 91 Cal. 91, and again affirmed in People v. Wallace, 94 Cal. 497. Assuming the complaint in this case to have been made a part of the commitment, we then have the defendant committed for an assault upon one Magin, and we have an information filed against him for an assault upon one Massino. This is a variance as fatal as though it arose upon the trial of the case.
The information not being based upon the commitment, can it be supported upon the theory that the evidence taken at the preliminary examination disclosed that the defendant committed an assault upon George Massino, and that, therefore, the district attorney was authorized in filing an information upon material furnished by that evidence ? In the case of People v. Vierra, 67 Cal. 231, the defendant by complaint was charged with the crime of murder, and upon examination was committed for manslaughter. Notwithstanding such commitment, the district attorney filed an information against him charging murder, and this court upheld that procedure. The same principle also arose in People v. Lee Ah Chuck, 66 Cal. 662, where the defendant was charged with an assault with intent to commit robbery, and committed for the offense of an attempt to commit robbery. The information was framed in line with the complaint, and alleged an assault with intent to commit robbery. While we have recognized the difference between the offense of assault with intent to commit a felony and the offense of an attempt to commit the same felony (People v. Lee Kong, 95 Cal. 667), yet the distinction is not a broad one, and they are so closely related that the evidence of one is usually sufficient to prove the other. Indeed, the attempt to commit a felony is always included in the assault with intent to commit the felony. In both of these cases the information charged the defendant with the offense alleged in the complaint upon which the preliminary examination was based, and there is no question but *475that they properly declare the law in that regard. There is also some general language found in People v. Staples, 91 Cal. 23, in line with the earlier cases we have quoted, but in that case the offense charged in the complaint and in the information was the same, and the opinion so states, consequently the language used was obiter dicta. In People v. Wheeler, 73 Cal. 252, the defendant was charged with robbery, and committed for the crime of false imprisonment, and this case is the only one we find directly opposed to the views we entertain upon this question. The principle there declared is unsound, and must be cast out as no authority for future guidance. It is not law that a person may be charged by complaint with larceny and held for trial for rape, even though the evidence taken at the preliminary examination indicates, to a certainty, that the defendant committed that offense. The case cited appears to go to the length of the illustration made, and cannot be sustained. It is violative of that provision of the constitution which does not allow a prosecution by information, unless the defendant has previously had a preliminary examination upon the offense for which he is prosecuted.
It is not only the right, but the legal duty, of the magistrate, to commit the defendant for a lower degree of the offense charged in the complaint, whenever the evidence indicates his guilt of such lower degree, and, while it is properly held in the Vierra case that the district attorney may file an information for murder against a defendant committed for manslaughter; yet, if the complaint upon which the defendant had been preliminarily examined had charged any other offense than that of murder, the action of the district attorney in filing the information would have been beyond the law. It may be laid down as an unquestioned proposition that the district attorney has no authority to disregard the commitment, and cull from the evidence taken at the preliminary examination some real or imaginary offense, not included in the complaint upon which the defendant was charged and examined.
*476In the case of People v. Giancoli, 74 Cal. 646, a case where the district attorney filed his information from data taken from the evidence at the examination, this court held that, if there was any evidence whatever in the record indicating the commission of the offense charged in the information, the district attorney’s action in the premises was beyond review, and conclusive. For this reason, among others, we are not disposed to expand the doctrine declared in the Vierra and Lee Chuck cases. The language found there may be broader than the facts of those cases, but any language which might be construed as holding that a defendant may be informed against for any offense shown by the evidence, regardless of the charge upon which he was examined, is too broad, and we do not desire it crystallized into a principle of law. The district attorney is not only required to file the information for some offense included in the allegations of the complaint, but the magistrate, likewise, only has the power to commit for some offense included therein. If such were not the true rule the whole procedure as to preliminary examinations would be absurd, and, as to the defendant, a mockery. Where a defendant is brought before a magistrate, charged with having committed a public offense, he must be informed of the charge against him, and advised as to his right to the aid of counsel in every stage of the proceeding. He is entitled to a certain time to prepare his defense. These provisions of the statute clearly contemplate that he shall be required to defend himself against the crime with which he is charged, and no other crime. He has not been notified of any other charge, and, consequently, is not prepared to defend himself against another charge.
There is no provision of the statute by which a defendant may take advantage of the admission of immaterial or incompetent evidence by the magistrate. Hence, all manner of crimes may be proven against him, and thus the district attorney would have the privilege of selecting the most heinous upon which to *477frame his information. Such is not the law, and whenever a defendant is informed against for an offense different from that charged in the complaint upon which he was examined, or not included therein, he has had no examination for that offense, and is entitled to have the information set aside upon the ground that he has not been legally committed.
In Ex parte Nicholas, 91 Cal. 640, the general language found in the Vierra case as to the right of the district attorney to file an information for any offense disclosed by the evidence is reiterated, but the matter there before the court was purely a question of jurisdiction, involving the right to a writ of habeas corpus, and whatever may have been said upon these lines was not demanded upon a disposition of the merits of the question under discussion. We also refer to the views of Mr. Justice Paterson, as expressed in his concurring opinion in Ex parte Nicholas, as being in entire accord with what we deem the law to be upon the matter under discussion. It follows that the offense charged in this information is not the offense for which the defendant was examined; neither is it an offense included therein, and consequently not one upon which the district attorney was justified in filing an information based upon data found in the evidence taken upon the preliminary examination of the defendant.
It is ordered that the judgment and order be reversed, and the cause remanded.
Paterson, J., and Harrison, J., concurred.